summaryrefslogtreecommitdiffstats
path: root/cmake/scripts/linux/ExtraTargets.cmake
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-10 18:07:22 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-10 18:07:22 +0000
commitc04dcc2e7d834218ef2d4194331e383402495ae1 (patch)
tree7333e38d10d75386e60f336b80c2443c1166031d /cmake/scripts/linux/ExtraTargets.cmake
parentInitial commit. (diff)
downloadkodi-c04dcc2e7d834218ef2d4194331e383402495ae1.tar.xz
kodi-c04dcc2e7d834218ef2d4194331e383402495ae1.zip
Adding upstream version 2:20.4+dfsg.upstream/2%20.4+dfsg
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--cmake/scripts/linux/ExtraTargets.cmake32
1 files changed, 32 insertions, 0 deletions
diff --git a/cmake/scripts/linux/ExtraTargets.cmake b/cmake/scripts/linux/ExtraTargets.cmake
new file mode 100644
index 0000000..4f5078b
--- /dev/null
+++ b/cmake/scripts/linux/ExtraTargets.cmake
@@ -0,0 +1,32 @@
+# xrandr
+if(X_FOUND AND XRANDR_FOUND)
+ find_package(X QUIET)
+ find_package(XRandR QUIET)
+ add_executable(${APP_NAME_LC}-xrandr ${CMAKE_SOURCE_DIR}/xbmc-xrandr.c)
+ target_link_libraries(${APP_NAME_LC}-xrandr ${SYSTEM_LDFLAGS} ${X_LIBRARIES} m ${XRANDR_LIBRARIES})
+endif()
+
+# WiiRemote
+if(ENABLE_EVENTCLIENTS AND BLUETOOTH_FOUND)
+ find_package(CWiid QUIET)
+ find_package(GLU QUIET)
+ if(CWIID_FOUND AND GLU_FOUND)
+ add_subdirectory(${CMAKE_SOURCE_DIR}/tools/EventClients/Clients/WiiRemote build/WiiRemote)
+ endif()
+endif()
+
+if("wayland" IN_LIST CORE_PLATFORM_NAME_LC)
+ # This cannot go into wayland.cmake since it requires the Wayland dependencies
+ # to already be resolved
+ set(PROTOCOL_XMLS "${WAYLANDPP_PROTOCOLS_DIR}/presentation-time.xml"
+ "${WAYLANDPP_PROTOCOLS_DIR}/xdg-shell.xml"
+ "${WAYLAND_PROTOCOLS_DIR}/unstable/xdg-shell/xdg-shell-unstable-v6.xml"
+ "${WAYLAND_PROTOCOLS_DIR}/unstable/idle-inhibit/idle-inhibit-unstable-v1.xml")
+ add_custom_command(OUTPUT "${WAYLAND_EXTRA_PROTOCOL_GENERATED_DIR}/wayland-extra-protocols.hpp" "${WAYLAND_EXTRA_PROTOCOL_GENERATED_DIR}/wayland-extra-protocols.cpp"
+ COMMAND "${WAYLANDPP_SCANNER}" ${PROTOCOL_XMLS} "${WAYLAND_EXTRA_PROTOCOL_GENERATED_DIR}/wayland-extra-protocols.hpp" "${WAYLAND_EXTRA_PROTOCOL_GENERATED_DIR}/wayland-extra-protocols.cpp"
+ DEPENDS "${WAYLANDPP_SCANNER}" ${PROTOCOL_XMLS}
+ COMMENT "Generating wayland-protocols C++ wrappers")
+
+ # Dummy target for dependencies
+ add_custom_target(generate-wayland-extra-protocols DEPENDS wayland-extra-protocols.hpp)
+endif()