diff options
author | Christian Fetzer <fetzer.ch@gmail.com> | 2016-11-05 10:31:15 +0100 |
---|---|---|
committer | Christian Fetzer <fetzer.ch@gmail.com> | 2016-11-06 14:15:02 +0100 |
commit | d3cc151212dda307564b009fbe5892b74916dac0 (patch) | |
tree | d3c074efa40afe1bd48bf1bcb7103b5475246e55 /tools/depends/target/Toolchain.cmake.in | |
parent | 82105b39a53c5cb90a41d7f067621511fc5b0fc5 (diff) |
[Toolchain] Unconditionally set CMAKE_CROSSCOMPILING
Set CMAKE_CROSSCOMPILING unconditionally if we have a toolchain file.
Also resort the _binaddons toolchain file so that it is closer to the
other one.
Diffstat (limited to 'tools/depends/target/Toolchain.cmake.in')
-rw-r--r-- | tools/depends/target/Toolchain.cmake.in | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/tools/depends/target/Toolchain.cmake.in b/tools/depends/target/Toolchain.cmake.in index b497b45323..1002673fb0 100644 --- a/tools/depends/target/Toolchain.cmake.in +++ b/tools/depends/target/Toolchain.cmake.in @@ -4,20 +4,23 @@ set(NATIVEPREFIX "@prefix@/@tool_dir@") set(OS "@platform_os@") set(CPU "@use_cpu@") set(PLATFORM "@target_platform@") -if(OS STREQUAL linux OR OS STREQUAL android) - set(CMAKE_SYSTEM_NAME Linux) -endif() -# set special CORE_SYSTEM_NAME -if(OS STREQUAL android) +# set CORE_SYSTEM_NAME and CMAKE_SYSTEM_NAME (sets CMAKE_CROSSCOMPILING) +if(OS STREQUAL linux) + set(CMAKE_SYSTEM_NAME Linux) + set(CORE_SYSTEM_NAME linux) + if(PLATFORM STREQUAL raspberry-pi) + set(CORE_SYSTEM_NAME rbpi) + endif() +elseif(OS STREQUAL android) + set(CMAKE_SYSTEM_NAME Linux) set(CORE_SYSTEM_NAME android) elseif(OS STREQUAL osx) + set(CMAKE_SYSTEM_NAME Darwin) set(CORE_SYSTEM_NAME osx) elseif(OS STREQUAL ios) - set(CORE_SYSTEM_NAME ios) set(CMAKE_SYSTEM_NAME Darwin) -elseif(PLATFORM STREQUAL raspberry-pi) - set(CORE_SYSTEM_NAME rbpi) + set(CORE_SYSTEM_NAME ios) endif() if(CORE_SYSTEM_NAME STREQUAL ios OR CORE_SYSTEM_NAME STREQUAL osx) @@ -30,6 +33,7 @@ set(CMAKE_C_COMPILER @CC@) set(CMAKE_CXX_COMPILER @CXX@) set(CMAKE_AR @AR@ CACHE FILEPATH "Archiver") set(CMAKE_LINKER @LD@ CACHE FILEPATH "Linker") +set(CMAKE_STRIP @STRIP@ CACHE PATH "strip binary" FORCE) # where is the target environment set(CMAKE_FIND_ROOT_PATH @prefix@/@deps_dir@) @@ -72,8 +76,7 @@ set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) set(ENV{PKG_CONFIG_LIBDIR} @prefix@/@deps_dir@/lib/pkgconfig) -set(CMAKE_STRIP @STRIP@ CACHE PATH "strip binary" FORCE) # Binary Addons -if(NOT OS STREQUAL linux) +if(NOT CORE_SYSTEM_NAME STREQUAL linux) set(ADDONS_PREFER_STATIC_LIBS ON) endif() |