diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2019-06-21 13:41:06 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2019-06-21 22:14:51 +0200 |
commit | 2899324acd4531803cfd678aa16ed16ef85c6083 (patch) | |
tree | 3675d4b6d849c09846bb68d294a576d415e177c3 /video-ps3eye/CMakeLists.txt | |
parent | 68a9ac0475aaf87db2b40940ae4ed88a67610d8e (diff) |
add right ps3eyedriver fork
Diffstat (limited to 'video-ps3eye/CMakeLists.txt')
-rw-r--r-- | video-ps3eye/CMakeLists.txt | 51 |
1 files changed, 20 insertions, 31 deletions
diff --git a/video-ps3eye/CMakeLists.txt b/video-ps3eye/CMakeLists.txt index fadae856..7c05b3a1 100644 --- a/video-ps3eye/CMakeLists.txt +++ b/video-ps3eye/CMakeLists.txt @@ -1,38 +1,27 @@ -if(WIN32) - if(MSVC) - set(SDK_LIBUSB "" CACHE PATH "") - else() - include(FindPkgConfig) - if(PKG_CONFIG_FOUND) - pkg_check_modules(libusb "libusb-1.0" QUIET) - endif() - endif() +add_compile_definitions(PS3EYE_DEBUG) - set(found FALSE) - if(MSVC) - if(SDK_LIBUSB) - set(found TRUE) - link_directories("${SDK_LIBUSB}") - include_directories("${SDK_LIBUSB}") +add_subdirectory("ps3eye-driver") - if(WIN32) - set(path "${SDK_LIBUSB}/libusb-1.0.dll") - if(EXISTS "${path}") - otr_install_lib("${path}" "${opentrack-hier-pfx}") - endif() - endif() +if(TARGET ps3eye-driver) + otr_module(video-ps3eye) + if(WIN32) + set(path "${SDK_LIBUSB}/libusb-1.0.dll") + if(EXISTS "${path}") + otr_install_lib("${path}" "${opentrack-hier-pfx}") endif() - elseif(libusb_FOUND) - set(found TRUE) - add_definitions(${libusb_CFLAGS}) - link_directories(${libusb_LIBRARY_DIRS}) - include_directories(${libusb_INCLUDE_DIRS}) - add_link_options(${libusb_LDFLAGS}) - link_libraries(${libusb_LIBRARIES}) endif() +endif() - if(found) - add_subdirectory("PS3EYEDriver") - otr_module(video-ps3eye) +if(TARGET ps3eye-test) + install(TARGETS "ps3eye-test" DESTINATION "${opentrack-hier-pfx}") + if(WIN32) + foreach(k ${SDL2_LIBRARIES}) + get_filename_component(path "${k}" PATH) + set(lib "${path}/SDL2.dll") + if(EXISTS "${lib}") + otr_install_lib("${lib}" "${opentrack-hier-pfx}") + break() + endif() + endforeach() endif() endif() |