summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rwxr-xr-xCMakeLists.txt19
-rw-r--r--cmake/msvc.cmake9
-rw-r--r--cmake/opentrack-qt.cmake2
-rw-r--r--sdk-paths-sthalik@MSVC.cmake22
4 files changed, 47 insertions, 5 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")
diff --git a/cmake/msvc.cmake b/cmake/msvc.cmake
index 42a89c40..50144132 100644
--- a/cmake/msvc.cmake
+++ b/cmake/msvc.cmake
@@ -3,7 +3,7 @@
# mkdir build && cmake -DCMAKE_TOOLCHAIN_FILE=$(pwd)/../cmake/msvc.cmake build/
SET(CMAKE_SYSTEM_NAME Windows)
-SET(CMAKE_SYSTEM_VERSION 1)
+SET(CMAKE_SYSTEM_VERSION 6.0)
# search for programs in the host directories
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
@@ -83,10 +83,11 @@ set(CMAKE_RC_FLAGS "-nologo -DWIN32")
if(NOT CMAKE_INSTALL_PREFIX)
set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/install" CACHE PATH "" FORCE)
-endif()
-
-if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "RELEASE" CACHE STRING "" FORCE)
+ set(CMAKE_CXX_FLAGS_RELEASE " " CACHE STRING "" FORCE)
+ set(CMAKE_C_FLAGS_RELEASE " " CACHE STRING "" FORCE)
+ set(CMAKE_CXX_FLAGS " " CACHE STRING "" FORCE)
+ set(CMAKE_C_FLAGS " " CACHE STRING "" FORCE)
endif()
include("${CMAKE_CURRENT_LIST_DIR}/opentrack-policy.cmake")
diff --git a/cmake/opentrack-qt.cmake b/cmake/opentrack-qt.cmake
index de1c41c4..f297f482 100644
--- a/cmake/opentrack-qt.cmake
+++ b/cmake/opentrack-qt.cmake
@@ -1,7 +1,7 @@
+find_package(Qt5 REQUIRED COMPONENTS Core Network Widgets LinguistTools Gui QUIET)
if(WIN32)
find_package(Qt5Gui REQUIRED COMPONENTS QWindowsIntegrationPlugin)
endif()
-find_package(Qt5 REQUIRED COMPONENTS Core Network Widgets LinguistTools Gui QUIET)
find_package(Qt5 COMPONENTS SerialPort Gamepad QUIET)
include_directories(SYSTEM ${Qt5Core_INCLUDE_DIRS} ${Qt5Gui_INCLUDE_DIRS} ${Qt5Widgets_INCLUDE_DIRS} ${Qt5Network_INCLUDE_DIRS})
diff --git a/sdk-paths-sthalik@MSVC.cmake b/sdk-paths-sthalik@MSVC.cmake
new file mode 100644
index 00000000..bf1f59fb
--- /dev/null
+++ b/sdk-paths-sthalik@MSVC.cmake
@@ -0,0 +1,22 @@
+set(Qt5_DIR "D:/dev/qt-5.8.0-msvc2015/lib/cmake/Qt5")
+set(__depdir "d:/dev/opentrack-depends/")
+set(OpenCV_DIR "${__depdir}/opencv/build-msvc15")
+
+set(opentrack_disable-i18n-update TRUE CACHE BOOL "" FORCE)
+
+set(SDK_ARUCO_LIBPATH "${__depdir}/aruco/build-msvc/src/aruco.lib" CACHE FILEPATH "")
+set(EIGEN3_INCLUDE_DIR "${__depdir}/eigen" CACHE PATH "")
+
+set(SDK_FSUIPC "${__depdir}/fsuipc" CACHE PATH "")
+set(SDK_HYDRA "${__depdir}/SixenseSDK" CACHE PATH "")
+
+set(SDK_RIFT_025 "${__depdir}/LibOVR-025/build-msvc15" CACHE PATH "")
+set(SDK_RIFT_042 "${__depdir}/LibOVR-042/build-msvc15" CACHE PATH "")
+set(SDK_RIFT_080 "${__depdir}/LibOVR-080/build-msvc15" CACHE PATH "")
+set(SDK_RIFT_140 "${__depdir}/LibOVR-140/build-msvc15/install" CACHE PATH "")
+
+set(SDK_VALVE_STEAMVR "${__depdir}/steamvr" CACHE PATH "")
+set(SDK_TOBII_EYEX "${__depdir}/Tobii EyeX" CACHE PATH "")
+set(SDK_VJOYSTICK "${__depdir}/vjoystick" CACHE PATH "")
+
+set(SDK_REALSENSE "D:/RSSDK-R2" CACHE PATH "")