summaryrefslogtreecommitdiffhomepage
path: root/video-ps3eye/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'video-ps3eye/CMakeLists.txt')
-rw-r--r--video-ps3eye/CMakeLists.txt12
1 files changed, 8 insertions, 4 deletions
diff --git a/video-ps3eye/CMakeLists.txt b/video-ps3eye/CMakeLists.txt
index 5adcf2b0..d42c83ff 100644
--- a/video-ps3eye/CMakeLists.txt
+++ b/video-ps3eye/CMakeLists.txt
@@ -4,9 +4,13 @@ if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/ps3eye-driver/CMakeLists.txt")
add_subdirectory("ps3eye-driver")
if(NOT MSVC)
- find_package(LibUSB REQUIRED)
- include_directories(SYSTEM ${LibUSB_INCLUDE_DIRS})
- link_libraries(${LibUSB_LIBRARIES} -pthread)
+ if(PKG_CONFIG_FOUND)
+ pkg_check_modules(libusb "libusb-1.0" QUIET)
+ endif()
+ if(libusb_FOUND)
+ include_directories(SYSTEM ${libusb_INCLUDE_DIRS})
+ link_libraries(${libusb_LIBRARIES})
+ endif()
else()
set(SDK_LIBUSB CACHE PATH "")
if(SDK_LIBUSB)
@@ -49,4 +53,4 @@ endif()
if(TARGET ps3eye-frame-test)
install(TARGETS "ps3eye-frame-test" DESTINATION "${opentrack-hier-pfx}")
-endif()
+endif() \ No newline at end of file