diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2018-03-12 13:21:46 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2018-03-12 13:21:46 +0100 |
commit | b21781c3f4f9cf0a1e59f15a934d577201e5ad3d (patch) | |
tree | 7d14c19626114941d615e3994181f3e32bed9bfa | |
parent | 41a08676ec798fd9a09959bd85416cff233e7048 (diff) |
cmake/user-settings: use separate file for WSL
-rw-r--r-- | cmake/opentrack-load-user-settings.cmake | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/cmake/opentrack-load-user-settings.cmake b/cmake/opentrack-load-user-settings.cmake index ede46d7c..062a7fd4 100644 --- a/cmake/opentrack-load-user-settings.cmake +++ b/cmake/opentrack-load-user-settings.cmake @@ -11,7 +11,12 @@ endif() if(WIN32) set(__sdk_os "windows") else() - set(__sdk_os "$ENV{OSTYPE}") + string(REGEX MATCH "^Linux (.+)-Microsoft\$" __sdk_os_match "${CMAKE_SYSTEM_NAME} ${CMAKE_SYSTEM_VERSION}") + if(__sdk_os_match) + set(__sdk_os "Windows-WSL") + else() + set(__sdk_os "${CMAKE_SYSTEM_NAME}") + endif() endif() include(CMakeDetermineCCompiler) |