summaryrefslogtreecommitdiffhomepage
path: root/video-ps3eye/CMakeLists.txt
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2019-05-05 12:34:01 +0200
committerStanislaw Halik <sthalik@misaki.pl>2019-05-06 03:42:13 +0200
commit6eda8a85b84c4e661a8763429ae1978f8da7f9dd (patch)
tree5169e1bf6779f7442235f36a206a91e224cda05d /video-ps3eye/CMakeLists.txt
parent12dfd6dcf60d9fefef7f8723fb9bc5a21fdb5b61 (diff)
video/ps3eye: WIP
Diffstat (limited to 'video-ps3eye/CMakeLists.txt')
-rw-r--r--video-ps3eye/CMakeLists.txt41
1 files changed, 41 insertions, 0 deletions
diff --git a/video-ps3eye/CMakeLists.txt b/video-ps3eye/CMakeLists.txt
new file mode 100644
index 00000000..83bac8f3
--- /dev/null
+++ b/video-ps3eye/CMakeLists.txt
@@ -0,0 +1,41 @@
+if(WIN32)
+ if(MSVC)
+ set(SDK_LIBUSB "" CACHE PATH "")
+ else()
+ include(FindPkgConfig)
+ if(PKG_CONFIG_FOUND)
+ pkg_check_modules(lusb QUIET "libusb")
+ endif()
+ endif()
+
+ set(found FALSE)
+ if(MSVC)
+ if(SDK_LIBUSB)
+ set(found TRUE)
+ link_directories("${SDK_LIBUSB}")
+ include_directories("${SDK_LIBUSB}")
+
+ if(WIN32)
+ set(path "${SDK_LIBUSB}/libusb-1.0.dll")
+ if(EXISTS "${path}")
+ otr_install_lib("${path}" "${opentrack-hier-pfx}")
+ endif()
+ endif()
+ endif()
+ elseif(lusb_FOUND)
+ set(found TRUE)
+ add_definitions(${lusb_CFLAGS})
+ link_directories(${lusb_LIBRARY_DIRS})
+ include_directories(${lusb_INCLUDE_DIRS})
+ add_link_options(${lusb_LDFLAGS})
+ link_libraries(${lusb_LIBRARIES})
+ if(WIN32)
+ otr_install_lib(libusb "${opentrack-hier-path}")
+ endif()
+ endif()
+
+ if(found)
+ add_subdirectory("PS3EYEDriver")
+ otr_module(video-ps3eye)
+ endif()
+endif()