diff options
Diffstat (limited to 'Modules/CMakeSystem.cmake.in')
-rw-r--r-- | Modules/CMakeSystem.cmake.in | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/Modules/CMakeSystem.cmake.in b/Modules/CMakeSystem.cmake.in index ad921f6..0fbf387 100644 --- a/Modules/CMakeSystem.cmake.in +++ b/Modules/CMakeSystem.cmake.in @@ -1,5 +1,21 @@ -SET(CMAKE_SYSTEM "@CMAKE_SYSTEM@") -SET(CMAKE_SYSTEM_NAME "@CMAKE_SYSTEM_NAME@") -SET(CMAKE_SYSTEM_VERSION "@CMAKE_SYSTEM_VERSION@") -SET(CMAKE_SYSTEM_PROCESSOR "@CMAKE_SYSTEM_PROCESSOR@") +IF("@CMAKE_TOOLCHAIN_FILE@" STREQUAL "") + + SET(CMAKE_SYSTEM "@CMAKE_SYSTEM@") + SET(CMAKE_SYSTEM_NAME "@CMAKE_SYSTEM_NAME@") + SET(CMAKE_SYSTEM_VERSION "@CMAKE_SYSTEM_VERSION@") + SET(CMAKE_SYSTEM_PROCESSOR "@CMAKE_SYSTEM_PROCESSOR@") + +ELSE("@CMAKE_TOOLCHAIN_FILE@" STREQUAL "") + + INCLUDE("@CMAKE_TOOLCHAIN_FILE@") + +# set CMAKE_SYSTEM to the CMAKE_SYSTEM_NAME + SET(CMAKE_SYSTEM ${CMAKE_SYSTEM_NAME}) +# if there is a CMAKE_SYSTEM_VERSION then add a -${CMAKE_SYSTEM_VERSION} + IF(CMAKE_SYSTEM_VERSION) + SET(CMAKE_SYSTEM ${CMAKE_SYSTEM}-${CMAKE_SYSTEM_VERSION}) + ENDIF(CMAKE_SYSTEM_VERSION) + +ENDIF("@CMAKE_TOOLCHAIN_FILE@" STREQUAL "") + SET(CMAKE_SYSTEM_LOADED 1) |