summaryrefslogtreecommitdiffhomepage
path: root/tracker-hydra/CMakeLists.txt
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2015-10-30 09:01:32 +0100
committerStanislaw Halik <sthalik@misaki.pl>2015-10-30 09:01:32 +0100
commitd785d3616500d5846ac8c5f5a6347da832a593b4 (patch)
treeac670a125c5b880ad7e4b4f24a8635da4e66f0da /tracker-hydra/CMakeLists.txt
parent232c2ba8aca7900eaa950c48813ddfaca8a749a8 (diff)
parent9b736d361bcde7a2ddaf3fe54b471c0e658e94f4 (diff)
Merge branch 'unstable' into trackhat
* unstable: cmake: cleanup hydra rename gui directory move to subdirectory-based build system cmake: switch to GNU CC 5.2.0 in mingw-w64 toolchain file rift-080: forgot ovr_Initialize() rift 025: fix name
Diffstat (limited to 'tracker-hydra/CMakeLists.txt')
-rw-r--r--tracker-hydra/CMakeLists.txt34
1 files changed, 34 insertions, 0 deletions
diff --git a/tracker-hydra/CMakeLists.txt b/tracker-hydra/CMakeLists.txt
new file mode 100644
index 00000000..2c90e285
--- /dev/null
+++ b/tracker-hydra/CMakeLists.txt
@@ -0,0 +1,34 @@
+SET(SDK_HYDRA "" CACHE PATH "libSixense path for Razer Hydra")
+SET(SDK_HYDRA_AMD64 FALSE CACHE BOOL "whether libSixense is amd64 (else ia-32)")
+if(SDK_HYDRA)
+ opentrack_boilerplate(opentrack-tracker-hydra)
+ target_include_directories(opentrack-tracker-hydra SYSTEM PUBLIC ${SDK_HYDRA}/include ${SDK_HYDRA}/include/sixense_utils)
+ if(WIN32)
+ if(MSVC)
+ set(dir lib)
+ set(ext lib)
+ else()
+ set(dir bin)
+ set(ext dll)
+ endif()
+ target_link_libraries(opentrack-tracker-hydra "${SDK_HYDRA}/${dir}/win32/release_dll/sixense.${ext}")
+ install(FILES "${SDK_HYDRA}/bin/win32/release_dll/sixense.dll" DESTINATION . ${opentrack-perms})
+ else()
+ if(SDK_HYDRA_AMD64)
+ set(six4 _x64)
+ else()
+ set(six4)
+ endif()
+ if(APPLE)
+ set(under-dll _dll)
+ set(soext dylib)
+ set(plat osx)
+ else()
+ set(under-dll)
+ set(soext so)
+ set(plat linux)
+ endif()
+ install(FILES "${SDK_HYDRA}/lib/${plat}${six4}/release${under-dll}/libsixense${six4}.${soext}" DESTINATION .)
+ target_link_libraries(opentrack-tracker-hydra "${SDK_HYDRA}/lib/${plat}${six4}/release${under-dll}/libsixense${six4}.${soext}")
+ endif()
+endif()