diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2017-08-24 11:17:58 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2017-08-25 11:47:59 +0200 |
commit | ee513046912d5267265246378713334b2ea2d1f1 (patch) | |
tree | d4127e9a952548dbc5e9763e8317d83e8b90ef80 /cmake/opentrack-load-user-settings.cmake | |
parent | 65e895dfb662c3fd87e37628358f3bd955eb4b5f (diff) |
cmake: move to separate file
Diffstat (limited to 'cmake/opentrack-load-user-settings.cmake')
-rw-r--r-- | cmake/opentrack-load-user-settings.cmake | 19 |
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() + |