diff options
Diffstat (limited to 'cmake/scripts/linux')
| -rw-r--r-- | cmake/scripts/linux/ArchSetup.cmake | 28 | ||||
| -rw-r--r-- | cmake/scripts/linux/ExtraTargets.cmake | 6 |
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 @@ | |||
| 1 | set(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 | 2 | set(ARCH_DEFINES -D_LINUX -DTARGET_POSIX -DTARGET_LINUX -D_GNU_SOURCE) |
| 3 | if(CORE_PLATFORM_NAME_LC STREQUAL rbpi) | ||
| 4 | list(APPEND ARCH_DEFINES -D_ARMEL -DTARGET_RASPBERRY_PI) | ||
| 5 | endif() | ||
| 6 | set(SYSTEM_DEFINES -D__STDC_CONSTANT_MACROS -D_FILE_DEFINED | 3 | set(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) |
| 8 | set(PLATFORM_DIR platform/linux) | 5 | set(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() |
| 38 | endif() | 38 | endif() |
| 39 | 39 | ||
| 40 | # temp until further cleanup is done | ||
| 41 | # add Raspberry Pi 2 and 3 specific flags | ||
| 42 | if(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() | ||
| 48 | endif() | ||
| 49 | |||
| 40 | if((CMAKE_BUILD_TYPE STREQUAL Release OR CMAKE_BUILD_TYPE STREQUAL MinSizeRel) | 50 | if((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") | |||
| 84 | check_symbol_exists("mkostemp" "stdlib.h" HAVE_MKOSTEMP) | 94 | check_symbol_exists("mkostemp" "stdlib.h" HAVE_MKOSTEMP) |
| 85 | set(CMAKE_REQUIRED_DEFINITIONS "") | 95 | set(CMAKE_REQUIRED_DEFINITIONS "") |
| 86 | if(HAVE_MKOSTEMP) | 96 | if(HAVE_MKOSTEMP) |
| 87 | list(APPEND ARCH_DEFINES "-DHAVE_MKOSTEMP=1" "-D_GNU_SOURCE") | 97 | list(APPEND ARCH_DEFINES "-DHAVE_MKOSTEMP=1") |
| 88 | endif() | 98 | endif() |
| 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() | |||
| 17 | if(CORE_PLATFORM_NAME_LC STREQUAL "wayland") | 17 | if(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) |
| 29 | endif() \ No newline at end of file | 31 | endif() |
