summaryrefslogtreecommitdiffstats
path: root/cmake/scripts/linux
diff options
context:
space:
mode:
authormanuel <manuel@mausz.at>2018-04-17 00:15:38 +0200
committermanuel <manuel@mausz.at>2018-04-17 00:15:38 +0200
commitb3d195f0188758a14875a5a2f270e4fd190a679f (patch)
treecbe6a2d51afd7be095e29fd612107044cf1f391e /cmake/scripts/linux
parenta51f51db67e3eab80ac2ed28d403a6d77f7acc45 (diff)
downloadkodi-pvr-build-b3d195f0188758a14875a5a2f270e4fd190a679f.tar.gz
kodi-pvr-build-b3d195f0188758a14875a5a2f270e4fd190a679f.tar.bz2
kodi-pvr-build-b3d195f0188758a14875a5a2f270e4fd190a679f.zip
sync with upstream
Diffstat (limited to 'cmake/scripts/linux')
-rw-r--r--cmake/scripts/linux/ArchSetup.cmake28
-rw-r--r--cmake/scripts/linux/ExtraTargets.cmake6
2 files changed, 23 insertions, 11 deletions
diff --git a/cmake/scripts/linux/ArchSetup.cmake b/cmake/scripts/linux/ArchSetup.cmake
index ee69c09..fcee675 100644
--- a/cmake/scripts/linux/ArchSetup.cmake
+++ b/cmake/scripts/linux/ArchSetup.cmake
@@ -1,8 +1,5 @@
1set(ARCH_DEFINES -D_LINUX -DTARGET_POSIX -DTARGET_LINUX) 1# we always want to use GNU features if available, so set _GNU_SOURCE
2# temp until further cleanup is done 2set(ARCH_DEFINES -D_LINUX -DTARGET_POSIX -DTARGET_LINUX -D_GNU_SOURCE)
3if(CORE_PLATFORM_NAME_LC STREQUAL rbpi)
4 list(APPEND ARCH_DEFINES -D_ARMEL -DTARGET_RASPBERRY_PI)
5endif()
6set(SYSTEM_DEFINES -D__STDC_CONSTANT_MACROS -D_FILE_DEFINED 3set(SYSTEM_DEFINES -D__STDC_CONSTANT_MACROS -D_FILE_DEFINED
7 -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64) 4 -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64)
8set(PLATFORM_DIR platform/linux) 5set(PLATFORM_DIR platform/linux)
@@ -21,14 +18,17 @@ else()
21 set(ARCH arm) 18 set(ARCH arm)
22 set(NEON False) 19 set(NEON False)
23 set(NEON_FLAGS "-mcpu=arm1176jzf-s -mtune=arm1176jzf-s -mfloat-abi=hard -mfpu=vfp") 20 set(NEON_FLAGS "-mcpu=arm1176jzf-s -mtune=arm1176jzf-s -mfloat-abi=hard -mfpu=vfp")
24 elseif(CPU MATCHES "cortex-a7" OR CPU MATCHES "cortex-a53") 21 elseif(CPU MATCHES "cortex-a7")
25 set(ARCH arm) 22 set(ARCH arm)
26 set(NEON True) 23 set(NEON True)
27 set(NEON_FLAGS "-fPIC -mcpu=cortex-a7 -mfloat-abi=hard -mfpu=neon-vfpv4 -mvectorize-with-neon-quad") 24 set(NEON_FLAGS "-fPIC -mcpu=cortex-a7")
25 elseif(CPU MATCHES "cortex-a53")
26 set(ARCH arm)
27 set(NEON True)
28 set(NEON_FLAGS "-fPIC -mcpu=cortex-a53")
28 elseif(CPU MATCHES arm) 29 elseif(CPU MATCHES arm)
29 set(ARCH arm) 30 set(ARCH arm)
30 set(NEON True) 31 set(NEON True)
31 set(NEON_FLAGS "-mfpu=neon -mvectorize-with-neon-quad")
32 elseif(CPU MATCHES aarch64 OR CPU MATCHES arm64) 32 elseif(CPU MATCHES aarch64 OR CPU MATCHES arm64)
33 set(ARCH aarch64) 33 set(ARCH aarch64)
34 set(NEON True) 34 set(NEON True)
@@ -37,6 +37,16 @@ else()
37 endif() 37 endif()
38endif() 38endif()
39 39
40# temp until further cleanup is done
41# add Raspberry Pi 2 and 3 specific flags
42if(CORE_PLATFORM_NAME_LC STREQUAL rbpi)
43 if(CPU MATCHES "cortex-a7")
44 set(NEON_FLAGS "-fPIC -mcpu=cortex-a7 -mfloat-abi=hard -mfpu=neon-vfpv4 -mvectorize-with-neon-quad")
45 elseif(CPU MATCHES "cortex-a53")
46 set(NEON_FLAGS "-fPIC -mcpu=cortex-a53 -mfloat-abi=hard -mfpu=neon-fp-armv8 -mvectorize-with-neon-quad")
47 endif()
48endif()
49
40if((CMAKE_BUILD_TYPE STREQUAL Release OR CMAKE_BUILD_TYPE STREQUAL MinSizeRel) 50if((CMAKE_BUILD_TYPE STREQUAL Release OR CMAKE_BUILD_TYPE STREQUAL MinSizeRel)
41 AND CMAKE_COMPILER_IS_GNUCXX) 51 AND CMAKE_COMPILER_IS_GNUCXX)
42 # Make sure we strip binaries in Release build 52 # Make sure we strip binaries in Release build
@@ -84,7 +94,7 @@ set(CMAKE_REQUIRED_DEFINITIONS "-D_GNU_SOURCE")
84check_symbol_exists("mkostemp" "stdlib.h" HAVE_MKOSTEMP) 94check_symbol_exists("mkostemp" "stdlib.h" HAVE_MKOSTEMP)
85set(CMAKE_REQUIRED_DEFINITIONS "") 95set(CMAKE_REQUIRED_DEFINITIONS "")
86if(HAVE_MKOSTEMP) 96if(HAVE_MKOSTEMP)
87 list(APPEND ARCH_DEFINES "-DHAVE_MKOSTEMP=1" "-D_GNU_SOURCE") 97 list(APPEND ARCH_DEFINES "-DHAVE_MKOSTEMP=1")
88endif() 98endif()
89 99
90# Additional SYSTEM_DEFINES 100# Additional SYSTEM_DEFINES
diff --git a/cmake/scripts/linux/ExtraTargets.cmake b/cmake/scripts/linux/ExtraTargets.cmake
index 4753f73..37d196a 100644
--- a/cmake/scripts/linux/ExtraTargets.cmake
+++ b/cmake/scripts/linux/ExtraTargets.cmake
@@ -17,7 +17,9 @@ endif()
17if(CORE_PLATFORM_NAME_LC STREQUAL "wayland") 17if(CORE_PLATFORM_NAME_LC STREQUAL "wayland")
18 # This cannot go into wayland.cmake since it requires the Wayland dependencies 18 # This cannot go into wayland.cmake since it requires the Wayland dependencies
19 # to already be resolved 19 # to already be resolved
20 set(PROTOCOL_XMLS "${WAYLAND_PROTOCOLS_DIR}/unstable/xdg-shell/xdg-shell-unstable-v6.xml" 20 set(PROTOCOL_XMLS "${WAYLANDPP_PROTOCOLS_DIR}/presentation-time.xml"
21 "${WAYLANDPP_PROTOCOLS_DIR}/xdg-shell.xml"
22 "${WAYLAND_PROTOCOLS_DIR}/unstable/xdg-shell/xdg-shell-unstable-v6.xml"
21 "${WAYLAND_PROTOCOLS_DIR}/unstable/idle-inhibit/idle-inhibit-unstable-v1.xml") 23 "${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" 24 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" 25 COMMAND "${WAYLANDPP_SCANNER}" ${PROTOCOL_XMLS} "${WAYLAND_EXTRA_PROTOCOL_GENERATED_DIR}/wayland-extra-protocols.hpp" "${WAYLAND_EXTRA_PROTOCOL_GENERATED_DIR}/wayland-extra-protocols.cpp"
@@ -26,4 +28,4 @@ if(CORE_PLATFORM_NAME_LC STREQUAL "wayland")
26 28
27 # Dummy target for dependencies 29 # Dummy target for dependencies
28 add_custom_target(generate-wayland-extra-protocols DEPENDS wayland-extra-protocols.hpp) 30 add_custom_target(generate-wayland-extra-protocols DEPENDS wayland-extra-protocols.hpp)
29endif() \ No newline at end of file 31endif()