summaryrefslogtreecommitdiffhomepage
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2017-08-14 19:40:09 +0200
committerStanislaw Halik <sthalik@misaki.pl>2017-08-14 19:40:09 +0200
commit3707d139b301a5c73c20a6893904a03bb306e737 (patch)
tree6004f77706c42ecf45f74b65f8873242b0e170ad /CMakeLists.txt
parent68211946cb54721fcd865a395e8b6caeb3d76bf8 (diff)
cmake: some small quality-of-life improvements
Diffstat (limited to 'CMakeLists.txt')
-rwxr-xr-xCMakeLists.txt19
1 files changed, 19 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e5277d73..201b2110 100755
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -29,6 +29,25 @@ 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()
+
set_property(GLOBAL PROPERTY opentrack-all-modules "")
set_property(GLOBAL PROPERTY opentrack-all-source-dirs "")
set(opentrack_all-translations "" CACHE STRING "Leave empty for default")