summaryrefslogtreecommitdiffhomepage
path: root/video-ps3eye/CMakeLists.txt
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2019-07-07 14:10:27 +0200
committerStanislaw Halik <sthalik@misaki.pl>2019-07-07 14:10:27 +0200
commite1fa39122ef5eb53088afd8a2301cbc787e3ff1e (patch)
treefea50d7530f001b4c49290e38b193c0c6ef63a41 /video-ps3eye/CMakeLists.txt
parent8fa10fda8186b6cdd10430e4d6cb4ef8db1ee9a0 (diff)
video/ps3eye: skip with no submodules
Issue: #726
Diffstat (limited to 'video-ps3eye/CMakeLists.txt')
-rw-r--r--video-ps3eye/CMakeLists.txt32
1 files changed, 17 insertions, 15 deletions
diff --git a/video-ps3eye/CMakeLists.txt b/video-ps3eye/CMakeLists.txt
index 6510d8c7..98921f4f 100644
--- a/video-ps3eye/CMakeLists.txt
+++ b/video-ps3eye/CMakeLists.txt
@@ -1,21 +1,23 @@
add_compile_definitions(PS3EYE_DEBUG)
-add_subdirectory("ps3eye-driver")
+if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/ps3eye-driver/CMakeLists.txt")
+ add_subdirectory("ps3eye-driver")
-if(NOT MSVC)
- 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)
- set(libusb_FOUND TRUE)
- link_directories("${SDK_LIBUSB}")
- include_directories(SYSTEM "${SDK_LIBUSB}")
+ if(NOT MSVC)
+ 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)
+ set(libusb_FOUND TRUE)
+ link_directories("${SDK_LIBUSB}")
+ include_directories(SYSTEM "${SDK_LIBUSB}")
+ endif()
endif()
endif()