SET(SDK_HYDRA "" CACHE PATH "libSixense path for Razer Hydra") 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) set(ext lib) else() 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(APPLE) set(dest .) set(under-dll _dll) set(soext dylib) set(plat osx_x64) else() 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() 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()