summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rwxr-xr-xCMakeLists.txt20
-rw-r--r--cmake/opentrack-load-user-settings.cmake19
2 files changed, 20 insertions, 19 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 201b2110..d5e45c64 100755
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -28,25 +28,7 @@ include(opentrack-mrproper)
project(opentrack)
cmake_minimum_required(VERSION 2.8.11)
include(opentrack-policy NO_POLICY_SCOPE)
-
-include(CMakeDetermineCCompiler)
-include(CMakeDetermineCXXCompiler)
-
-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()
-
-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()
+include(opentrack-load-user-settings)
set_property(GLOBAL PROPERTY opentrack-all-modules "")
set_property(GLOBAL PROPERTY opentrack-all-source-dirs "")
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()
+