summaryrefslogtreecommitdiffhomepage
path: root/cmake/opentrack-load-user-settings.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/opentrack-load-user-settings.cmake')
-rw-r--r--cmake/opentrack-load-user-settings.cmake19
1 files changed, 19 insertions, 0 deletions
diff --git a/cmake/opentrack-load-user-settings.cmake b/cmake/opentrack-load-user-settings.cmake
new file mode 100644
index 00000000..bcb37383
--- /dev/null
+++ b/cmake/opentrack-load-user-settings.cmake
@@ -0,0 +1,19 @@
+if(WIN32)
+ set(__sdk_username "$ENV{USERNAME}")
+else()
+ set(__sdk_username "$ENV{USER}")
+endif()
+
+if(".${__sdk_username}" STREQUAL ".")
+ set(__sdk_username "(I-have-no-name)")
+endif()
+
+include(CMakeDetermineCCompiler)
+include(CMakeDetermineCXXCompiler)
+
+set(__sdk_paths_filename "${CMAKE_SOURCE_DIR}/sdk-paths-${__sdk_username}@${CMAKE_CXX_COMPILER_ID}.cmake")
+
+if(EXISTS "${__sdk_paths_filename}")
+ include("${__sdk_paths_filename}")
+endif()
+