diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2015-10-30 07:37:41 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2015-10-30 08:39:32 +0100 |
commit | aa066bdd4622d4f6824fee864f6be6806813f04d (patch) | |
tree | 3df328b8b364cba2373a85827191b259bd78d546 /tracker-hydra/CMakeLists.txt | |
parent | d6a54431d178632a2bf466c9904f74abd143afe6 (diff) |
move to subdirectory-based build system
Closes #224
Diffstat (limited to 'tracker-hydra/CMakeLists.txt')
-rw-r--r-- | tracker-hydra/CMakeLists.txt | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/tracker-hydra/CMakeLists.txt b/tracker-hydra/CMakeLists.txt new file mode 100644 index 00000000..6a4a7cfe --- /dev/null +++ b/tracker-hydra/CMakeLists.txt @@ -0,0 +1,44 @@ +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}" + #"${SDK_HYDRA}/${dir}/win32/release_dll/sixense_utils.${ext}" + ) + install(FILES "${SDK_HYDRA}/bin/win32/release_dll/sixense.dll" + #"${SDK_HYDRA}/bin/win32/release_dll/sixense_utils.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() |