summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2016-07-06 12:06:19 +0200
committerStanislaw Halik <sthalik@misaki.pl>2016-07-06 12:07:50 +0200
commitf69ac22aa0dbe7218c33a374133c88e8f4e5a65a (patch)
tree2584e535c93a869850f3b73ef040b5b97fc8a2cd
parent8b162b3d26d35d628c9dce83f7267c5a9e04b44d (diff)
cmake/hydra: try fix osx sixense link
-rw-r--r--tracker-hydra/CMakeLists.txt33
1 files changed, 20 insertions, 13 deletions
diff --git a/tracker-hydra/CMakeLists.txt b/tracker-hydra/CMakeLists.txt
index 2c90e285..14c20020 100644
--- a/tracker-hydra/CMakeLists.txt
+++ b/tracker-hydra/CMakeLists.txt
@@ -1,8 +1,9 @@
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)
+ include(opentrack-hier)
opentrack_boilerplate(opentrack-tracker-hydra)
target_include_directories(opentrack-tracker-hydra SYSTEM PUBLIC ${SDK_HYDRA}/include ${SDK_HYDRA}/include/sixense_utils)
+ set(six4 "")
if(WIN32)
if(MSVC)
set(dir lib)
@@ -11,24 +12,30 @@ if(SDK_HYDRA)
set(dir bin)
set(ext dll)
endif()
+ set(under_dll _dll)
+ set(soext dll)
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)
+ set(dest .)
+ set(under-dll _dll)
+ set(soext dylib)
+ set(plat osx_x64)
else()
- set(under-dll)
- set(soext so)
- set(plat linux)
+ set(dest ${opentrack-hier-pfx})
+ set(under-dll)
+ set(soext so)
+ set(plat linux)
+ execute_process(COMMAND uname -m OUTPUT_VARIABLE architecture)
+ string(REPLACE "\n" "" architecture ${architecture})
+ if(architecture STREQUAL "x86_64")
+ set(six4 _x64)
+ else()
+ set(six4)
+ endif()
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}")
+ install(FILES "${SDK_HYDRA}/lib/${plat}${six4}/release${under-dll}/libsixense${six4}.${soext}" DESTINATION libexec/opentrack ${opentrack-perms})
endif()
endif()