summaryrefslogtreecommitdiffstats
path: root/cmake/scripts/linux
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/scripts/linux')
-rw-r--r--cmake/scripts/linux/ArchSetup.cmake19
-rw-r--r--cmake/scripts/linux/ExtraTargets.cmake14
2 files changed, 33 insertions, 0 deletions
diff --git a/cmake/scripts/linux/ArchSetup.cmake b/cmake/scripts/linux/ArchSetup.cmake
index bf32fe0..74018d0 100644
--- a/cmake/scripts/linux/ArchSetup.cmake
+++ b/cmake/scripts/linux/ArchSetup.cmake
@@ -42,9 +42,28 @@ if(CMAKE_BUILD_TYPE STREQUAL Release AND CMAKE_COMPILER_IS_GNUCXX)
42 set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -s") 42 set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -s")
43endif() 43endif()
44 44
45if(KODI_DEPENDSBUILD)
46 # Binaries should be directly runnable from host, so include rpath to depends
47 set(CMAKE_INSTALL_RPATH "${DEPENDS_PATH}/lib")
48 set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
49endif()
50
45find_package(CXX11 REQUIRED) 51find_package(CXX11 REQUIRED)
46include(LDGOLD) 52include(LDGOLD)
47 53
54include(CheckIncludeFiles)
55check_include_files("linux/memfd.h" HAVE_LINUX_MEMFD)
56if(HAVE_LINUX_MEMFD)
57 list(APPEND ARCH_DEFINES "-DHAVE_LINUX_MEMFD=1")
58endif()
59include(CheckSymbolExists)
60set(CMAKE_REQUIRED_DEFINITIONS "-D_GNU_SOURCE")
61check_symbol_exists("mkostemp" "stdlib.h" HAVE_MKOSTEMP)
62set(CMAKE_REQUIRED_DEFINITIONS "")
63if(HAVE_MKOSTEMP)
64 list(APPEND ARCH_DEFINES "-DHAVE_MKOSTEMP=1" "-D_GNU_SOURCE")
65endif()
66
48# Code Coverage 67# Code Coverage
49if(CMAKE_BUILD_TYPE STREQUAL Coverage) 68if(CMAKE_BUILD_TYPE STREQUAL Coverage)
50 set(COVERAGE_TEST_BINARY ${APP_NAME_LC}-test) 69 set(COVERAGE_TEST_BINARY ${APP_NAME_LC}-test)
diff --git a/cmake/scripts/linux/ExtraTargets.cmake b/cmake/scripts/linux/ExtraTargets.cmake
index e89aab6..4753f73 100644
--- a/cmake/scripts/linux/ExtraTargets.cmake
+++ b/cmake/scripts/linux/ExtraTargets.cmake
@@ -13,3 +13,17 @@ if(ENABLE_EVENTCLIENTS AND BLUETOOTH_FOUND)
13 add_subdirectory(${CMAKE_SOURCE_DIR}/tools/EventClients/Clients/WiiRemote build/WiiRemote) 13 add_subdirectory(${CMAKE_SOURCE_DIR}/tools/EventClients/Clients/WiiRemote build/WiiRemote)
14 endif() 14 endif()
15endif() 15endif()
16
17if(CORE_PLATFORM_NAME_LC STREQUAL "wayland")
18 # This cannot go into wayland.cmake since it requires the Wayland dependencies
19 # to already be resolved
20 set(PROTOCOL_XMLS "${WAYLAND_PROTOCOLS_DIR}/unstable/xdg-shell/xdg-shell-unstable-v6.xml"
21 "${WAYLAND_PROTOCOLS_DIR}/unstable/idle-inhibit/idle-inhibit-unstable-v1.xml")
22 add_custom_command(OUTPUT "${WAYLAND_EXTRA_PROTOCOL_GENERATED_DIR}/wayland-extra-protocols.hpp" "${WAYLAND_EXTRA_PROTOCOL_GENERATED_DIR}/wayland-extra-protocols.cpp"
23 COMMAND "${WAYLANDPP_SCANNER}" ${PROTOCOL_XMLS} "${WAYLAND_EXTRA_PROTOCOL_GENERATED_DIR}/wayland-extra-protocols.hpp" "${WAYLAND_EXTRA_PROTOCOL_GENERATED_DIR}/wayland-extra-protocols.cpp"
24 DEPENDS "${WAYLANDPP_SCANNER}" ${PROTOCOL_XMLS}
25 COMMENT "Generating wayland-protocols C++ wrappers")
26
27 # Dummy target for dependencies
28 add_custom_target(generate-wayland-extra-protocols DEPENDS wayland-extra-protocols.hpp)
29endif() \ No newline at end of file