From 2899324acd4531803cfd678aa16ed16ef85c6083 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Fri, 21 Jun 2019 13:41:06 +0200 Subject: add right ps3eyedriver fork --- .gitmodules | 3 +++ video-ps3eye/CMakeLists.txt | 51 ++++++++++++++++++--------------------------- video-ps3eye/ps3eye-driver | 1 + 3 files changed, 24 insertions(+), 31 deletions(-) create mode 160000 video-ps3eye/ps3eye-driver diff --git a/.gitmodules b/.gitmodules index e69de29b..cad06181 100644 --- a/.gitmodules +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "video-ps3eye/ps3eye-driver"] + path = video-ps3eye/ps3eye-driver + url = https://github.com/opentrack/PS3EYEDriver 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() diff --git a/video-ps3eye/ps3eye-driver b/video-ps3eye/ps3eye-driver new file mode 160000 index 00000000..764c6047 --- /dev/null +++ b/video-ps3eye/ps3eye-driver @@ -0,0 +1 @@ +Subproject commit 764c6047bc39473c5b85b69f625c9ced31d8b638 -- cgit v1.2.3