mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-26 01:59:01 +08:00
37 lines
1.5 KiB
Diff
37 lines
1.5 KiB
Diff
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||
|
index 672f6e2..555cb8f 100644
|
||
|
--- a/CMakeLists.txt
|
||
|
+++ b/CMakeLists.txt
|
||
|
@@ -109,19 +109,23 @@ find_library(JPEG_TURBO turbojpeg REQUIRED)
|
||
|
find_package(Matroska CONFIG REQUIRED)
|
||
|
add_definitions(-DMATROSKA_VERSION=2)
|
||
|
find_package(libsoundio CONFIG REQUIRED)
|
||
|
-find_package(libusb CONFIG REQUIRED)
|
||
|
-find_package(libuvc CONFIG REQUIRED)
|
||
|
+if (NOT WIN32)
|
||
|
+ find_package(libusb CONFIG REQUIRED)
|
||
|
+ find_package(libuvc CONFIG REQUIRED)
|
||
|
+ add_library(libuvc::libuvc ALIAS LibUVC::UVCStatic)
|
||
|
+ find_package(OpenSSL REQUIRED)
|
||
|
+ find_package(ZLIB REQUIRED)
|
||
|
+ add_library(libjpeg-turbo::libjpeg-turbo STATIC IMPORTED)
|
||
|
+ set_property(TARGET libjpeg-turbo::libjpeg-turbo PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${JPEG_INCLUDE_DIR})
|
||
|
+ set_property(TARGET libjpeg-turbo::libjpeg-turbo PROPERTY IMPORTED_LOCATION ${JPEG_LIBRARIES})
|
||
|
+else()
|
||
|
+ find_library(LibUSB libusb-1.0 REQUIRED)
|
||
|
+endif()
|
||
|
find_package(libyuv CONFIG REQUIRED)
|
||
|
find_package(spdlog CONFIG REQUIRED)
|
||
|
-find_package(OpenSSL REQUIRED)
|
||
|
-find_package(ZLIB REQUIRED)
|
||
|
if (BUILD_TOOLS)
|
||
|
find_package(gl3w CONFIG REQUIRED)
|
||
|
endif()
|
||
|
-add_library(libuvc::libuvc ALIAS LibUVC::UVCStatic)
|
||
|
-add_library(libjpeg-turbo::libjpeg-turbo STATIC IMPORTED)
|
||
|
-set_property(TARGET libjpeg-turbo::libjpeg-turbo PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${JPEG_INCLUDE_DIR})
|
||
|
-set_property(TARGET libjpeg-turbo::libjpeg-turbo PROPERTY IMPORTED_LOCATION ${JPEG_LIBRARIES})
|
||
|
# add jpeg-turbo library to jpeg libraries.
|
||
|
set(JPEG_LIBRARIES ${JPEG_LIBRARIES} ${JPEG_TURBO})
|
||
|
# Fix embl error
|