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() 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(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() if(found) add_subdirectory("PS3EYEDriver") otr_module(video-ps3eye) endif() endif()