diff options
author | Lukas Rusak <lorusak@gmail.com> | 2017-07-17 09:46:53 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-17 09:46:52 -0700 |
commit | d790e543f5ed268222c13cc7267ea988b8a9fb50 (patch) | |
tree | 612c502a139fab30010d58cb43667dd2c2c87b73 /CMakeLists.txt | |
parent | c017155b7f26196ad681e34cacd493bc0a388b8d (diff) | |
parent | dba9e06c5bb369208909729ffbf6560885026e9a (diff) |
Merge pull request #12021 from lrusak/rpi-cleanup
[linux] treat rbpi as linux not a separate platform
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 29 |
1 files changed, 2 insertions, 27 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 7a046a0c3a..bb5fbb3d89 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -24,6 +24,7 @@ endif() include(cmake/modules/extra/ECMEnableSanitizers.cmake) include(cmake/scripts/common/GeneratorSetup.cmake) include(cmake/scripts/common/AddOptions.cmake) +include(cmake/scripts/common/Platform.cmake) include(cmake/scripts/common/ArchSetup.cmake) include(cmake/scripts/common/Macros.cmake) include(cmake/scripts/common/ProjectMacros.cmake) @@ -56,7 +57,7 @@ if(NOT WIN32) option(WITH_ARCH "build with given arch" OFF) option(WITH_CPU "build with given cpu" OFF) endif() -if(CORE_SYSTEM_NAME STREQUAL linux OR CORE_SYSTEM_NAME STREQUAL rbpi) +if(CORE_SYSTEM_NAME STREQUAL linux) option(ENABLE_LIRC "Enable LIRC support?" ON) option(ENABLE_EVENTCLIENTS "Enable event clients support?" OFF) endif() @@ -93,32 +94,6 @@ endif() find_package(Threads REQUIRED QUIET) list(APPEND DEPLIBS ${CMAKE_THREAD_LIBS_INIT}) -# Platform -if(CORE_SYSTEM_NAME STREQUAL linux) - # Set default CORE_PLATFORM_NAME to X11 - # This is overridden by user setting -DCORE_PLATFORM_NAME=<platform> - set(_DEFAULT_PLATFORM X11) -else() - string(TOLOWER ${CORE_SYSTEM_NAME} _DEFAULT_PLATFORM) -endif() - -set(CORE_PLATFORM_NAME ${_DEFAULT_PLATFORM} CACHE STRING "Platform port to build") -# -# Note: please do not use CORE_PLATFORM_NAME in any checks, -# use the normalized to lower case CORE_PLATFORM_NAME_LC (see below) instead -# -unset(_DEFAULT_PLATFORM) -string(TOLOWER ${CORE_PLATFORM_NAME} CORE_PLATFORM_NAME_LC) - -list(APPEND final_message "Platform: ${CORE_PLATFORM_NAME}") -if(EXISTS ${CMAKE_SOURCE_DIR}/cmake/platform/${CORE_SYSTEM_NAME}/${CORE_PLATFORM_NAME_LC}.cmake) - include(${CMAKE_SOURCE_DIR}/cmake/platform/${CORE_SYSTEM_NAME}/${CORE_PLATFORM_NAME_LC}.cmake) -else() - file(GLOB _platformnames RELATIVE ${CMAKE_SOURCE_DIR}/cmake/platform/${CORE_SYSTEM_NAME}/ - ${CMAKE_SOURCE_DIR}/cmake/platform/${CORE_SYSTEM_NAME}/*.cmake) - string(REPLACE ".cmake" " " _platformnames ${_platformnames}) - message(FATAL_ERROR "invalid CORE_PLATFORM_NAME: ${CORE_PLATFORM_NAME_LC}\nValid platforms: ${_platformnames}") -endif() foreach(dep ${PLATFORM_REQUIRED_DEPS}) # We need to specify ENABLE_${PLATFORM_REQUIRED_DEPS} in order for the |