Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
add right ps3eyedriver fork
  • Loading branch information
sthalik committed Jun 21, 2019
1 parent 68a9ac0 commit 2899324
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 31 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
@@ -0,0 +1,3 @@
[submodule "video-ps3eye/ps3eye-driver"]
path = video-ps3eye/ps3eye-driver
url = https://github.com/opentrack/PS3EYEDriver
51 changes: 20 additions & 31 deletions 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()
1 change: 1 addition & 0 deletions video-ps3eye/ps3eye-driver
Submodule ps3eye-driver added at 764c60

0 comments on commit 2899324

Please sign in to comment.