diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2018-10-29 08:47:45 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2018-10-29 08:25:57 +0000 |
commit | 8d61e6f2687fe0ca7cd16602d22d01ddd3db7091 (patch) | |
tree | 2d08252c7f1607643a32ae98e8bcb2997b3c0cc6 /cmake | |
parent | f9ec53a06072be66d43a9e505ad44e2750349b38 (diff) |
cmake: use separate dev settings for cross builds
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/opentrack-load-user-settings.cmake | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/cmake/opentrack-load-user-settings.cmake b/cmake/opentrack-load-user-settings.cmake index 35085b65..a0284943 100644 --- a/cmake/opentrack-load-user-settings.cmake +++ b/cmake/opentrack-load-user-settings.cmake @@ -10,13 +10,13 @@ if(".${__sdk_username}" STREQUAL ".") endif() if(WIN32) - set(__sdk_os "windows") + set(__sdk_target_os "windows") else() - string(REGEX MATCH "^Linux (.+)-Microsoft\$" __sdk_os_match "${CMAKE_SYSTEM_NAME} ${CMAKE_SYSTEM_VERSION}") - if(__sdk_os_match) - set(__sdk_os "Windows-WSL") + string(REGEX MATCH "^Linux (.+)-Microsoft\$" __sdk_target_os_match "${CMAKE_SYSTEM_NAME} ${CMAKE_SYSTEM_VERSION}") + if(__sdk_target_os_match) + set(__sdk_target_os "Windows-WSL") else() - set(__sdk_os "${CMAKE_SYSTEM_NAME}") + set(__sdk_target_os "${CMAKE_SYSTEM_NAME}") endif() endif() @@ -24,13 +24,12 @@ include(CMakeDetermineCCompiler) include(CMakeDetermineCXXCompiler) if(NOT CMAKE_SYSTEM_NAME STREQUAL CMAKE_HOST_SYSTEM_NAME) - set(__sdk_os_maybe_target "${CMAKE_HOST_SYSTEM_NAME}-") + set(__sdk_host_os "${CMAKE_HOST_SYSTEM_NAME}-cross-") else() - set(__sdk_os_maybe_target "") + set(__sdk_host_os "") endif() -set(__sdk_paths_basename "sdk-paths-${__sdk_username}@${CMAKE_CXX_COMPILER_ID}-${__sdk_os_maybe_target}${__sdk_os}.cmake") - +set(__sdk_paths_basename "sdk-paths-${__sdk_username}@${CMAKE_CXX_COMPILER_ID}-${__sdk_host_os}${__sdk_target_os}.cmake") set(__sdk_paths_filename "${CMAKE_SOURCE_DIR}/${__sdk_paths_basename}") if(EXISTS "${__sdk_paths_filename}") |