From ee513046912d5267265246378713334b2ea2d1f1 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Thu, 24 Aug 2017 11:17:58 +0200 Subject: cmake: move to separate file --- cmake/opentrack-load-user-settings.cmake | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 cmake/opentrack-load-user-settings.cmake (limited to 'cmake') 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() + -- cgit v1.2.3