summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2019-06-21 13:41:06 +0200
committerStanislaw Halik <sthalik@misaki.pl>2019-06-21 22:14:51 +0200
commit2899324acd4531803cfd678aa16ed16ef85c6083 (patch)
tree3675d4b6d849c09846bb68d294a576d415e177c3
parent68a9ac0475aaf87db2b40940ae4ed88a67610d8e (diff)
add right ps3eyedriver fork
-rw-r--r--.gitmodules3
-rw-r--r--video-ps3eye/CMakeLists.txt51
m---------video-ps3eye/ps3eye-driver0
3 files changed, 23 insertions, 31 deletions
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
+Subproject 764c6047bc39473c5b85b69f625c9ced31d8b63