summaryrefslogtreecommitdiffhomepage
path: root/cmake
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2018-03-13 09:40:54 +0100
committerStanislaw Halik <sthalik@misaki.pl>2018-03-13 09:40:54 +0100
commit30f5dcd71cb63bb905fb039c03117469a9a63873 (patch)
tree1e89e9d163b88ba669661f25285b6a8de3a8d1ef /cmake
parentb21781c3f4f9cf0a1e59f15a934d577201e5ad3d (diff)
cmake: support per-cross-compile user settings
Diffstat (limited to 'cmake')
-rw-r--r--cmake/opentrack-load-user-settings.cmake8
1 files changed, 7 insertions, 1 deletions
diff --git a/cmake/opentrack-load-user-settings.cmake b/cmake/opentrack-load-user-settings.cmake
index 062a7fd4..ab88d2a8 100644
--- a/cmake/opentrack-load-user-settings.cmake
+++ b/cmake/opentrack-load-user-settings.cmake
@@ -22,7 +22,13 @@ endif()
include(CMakeDetermineCCompiler)
include(CMakeDetermineCXXCompiler)
-set(__sdk_paths_filename "${CMAKE_SOURCE_DIR}/sdk-paths-${__sdk_username}@${CMAKE_CXX_COMPILER_ID}-${__sdk_os}.cmake")
+if(NOT CMAKE_SYSTEM_NAME STREQUAL CMAKE_HOST_SYSTEM_NAME)
+ set(__sdk_os_maybe_target "${CMAKE_HOST_SYSTEM_NAME}-")
+else()
+ set(__sdk_os_maybe_target "")
+endif()
+
+set(__sdk_paths_filename "${CMAKE_SOURCE_DIR}/sdk-paths-${__sdk_username}@${CMAKE_CXX_COMPILER_ID}-${__sdk_os_maybe_target}${__sdk_os}.cmake")
if(EXISTS "${__sdk_paths_filename}")
include("${__sdk_paths_filename}")