summaryrefslogtreecommitdiffhomepage
path: root/tracker-steamvr/CMakeLists.txt
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2016-11-03 23:42:02 +0100
committerStanislaw Halik <sthalik@misaki.pl>2016-11-06 12:28:26 +0100
commit049044f181414991a103ace961214c78171c284d (patch)
tree1806ff05675c62df05d9e16623ea8c7a87395ec3 /tracker-steamvr/CMakeLists.txt
parentad1e96c576425a4daba20073e99ec0337f193882 (diff)
tracker/steamvr: TO REBASE
Diffstat (limited to 'tracker-steamvr/CMakeLists.txt')
-rw-r--r--tracker-steamvr/CMakeLists.txt36
1 files changed, 36 insertions, 0 deletions
diff --git a/tracker-steamvr/CMakeLists.txt b/tracker-steamvr/CMakeLists.txt
new file mode 100644
index 00000000..33194c23
--- /dev/null
+++ b/tracker-steamvr/CMakeLists.txt
@@ -0,0 +1,36 @@
+set(steamvr-dir "")
+set(steamvr-dll "")
+set(steamvr-lib "")
+
+if(LINUX AND opentrack-64bit)
+ set(steamvr-dir "linux64")
+ set(steamvr-dll "libopenvr_api.so")
+ set(steamvr-lib "${steamvr-dll}")
+endif()
+
+if(WIN32)
+ if(opentrack-64bit)
+ set(steamvr-dir "win64")
+ else()
+ set(steamvr-dir "win32")
+ endif()
+ set(steamvr-dll "openvr_api.dll")
+ set(steamvr-lib "openvr_api.lib")
+endif()
+
+if(APPLE AND NOT opentrack-64bit)
+ set(steamvr-dir "osx32")
+ set(steamvr-dll "libopenvr_api.dylib")
+ set(steamvr-lib "${steamvr-dll}")
+endif()
+
+if(steamvr-dll)
+ SET(SDK_VALVE_STEAMVR "" CACHE PATH "Valve's SteamVR")
+ if(SDK_VALVE_STEAMVR)
+ opentrack_boilerplate(opentrack-tracker-steamvr)
+
+ target_include_directories(opentrack-tracker-steamvr SYSTEM PUBLIC "${SDK_VALVE_STEAMVR}/headers")
+ target_link_libraries(opentrack-tracker-steamvr "${SDK_VALVE_STEAMVR}/lib/${steamvr-dir}/${steamvr-lib}")
+ install(FILES "${SDK_VALVE_STEAMVR}/bin/${steamvr-dir}/${steamvr-dll}" DESTINATION "${opentrack-hier-pfx}")
+ endif()
+endif()