mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-28 19:25:27 +08:00
e8e660a36c
* [vcpkg baseline][pangolin] Add features, fix dependency pybind11 * Fix dependency name realsense2 * Remove default-feature gles * Re-generated patch, add MAYBE_UNUSED_VARIABLES, fix build with core * version * Fix desc, add more MAYBE_UNUSED_VARIABLES * version * more MAYBE_UNUSED_VARIABLES * version * Remove some CMAKE_DISABLE_FIND_PACKAGE_* * version * Remove more CMAKE_DISABLE_FIND_* since they are disabled * Remove BUILD_FOR_GLES_2 * version * Restore BUILD_FOR_GLES_2 * version * Fix more dependencies * [libuvc]Fix build type, fix usage * version * Re-make patch * version * Use libjpeg macros instead of target name to avoid use `find_dependency` * version * Fix usage on non-Windows * version * commit suggestions * version * Apply suggestion * version * Re-fix JPEG * version * typo * format * version Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
45 lines
1.3 KiB
Diff
45 lines
1.3 KiB
Diff
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
index f3c8116..b9a6d38 100644
|
|
--- a/CMakeLists.txt
|
|
+++ b/CMakeLists.txt
|
|
@@ -39,10 +39,10 @@ set(SOURCES
|
|
src/misc.c
|
|
)
|
|
|
|
-find_package(LibUSB)
|
|
+find_package(libusb CONFIG REQUIRED)
|
|
|
|
# JpegPkg name to differ from shipped with CMake
|
|
-find_package(JpegPkg QUIET)
|
|
+find_package(JPEG REQUIRED)
|
|
if(JPEG_FOUND)
|
|
message(STATUS "Building libuvc with JPEG support.")
|
|
set(LIBUVC_HAS_JPEG TRUE)
|
|
@@ -107,9 +107,10 @@ foreach(target_name IN LISTS UVC_TARGETS)
|
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/include>
|
|
$<INSTALL_INTERFACE:include>
|
|
)
|
|
+ target_include_directories(${target_name} PRIVATE ${LIBUSB_INCLUDE_DIRS})
|
|
target_link_libraries(${target_name}
|
|
# libusb-1.0 used internally so we link to it privately.
|
|
- PRIVATE LibUSB::LibUSB
|
|
+ PRIVATE ${LIBUSB_LIBRARIES}
|
|
)
|
|
if(JPEG_FOUND)
|
|
target_link_libraries(${target_name}
|
|
diff --git a/libuvcConfig.cmake b/libuvcConfig.cmake
|
|
index b9887ea..e8f09dc 100644
|
|
--- a/libuvcConfig.cmake
|
|
+++ b/libuvcConfig.cmake
|
|
@@ -10,8 +10,8 @@ if(${CMAKE_FIND_PACKAGE_NAME}_FIND_REQUIRED)
|
|
list(APPEND extraArgs REQUIRED)
|
|
endif()
|
|
|
|
-find_package(JpegPkg ${extraArgs})
|
|
-find_package(LibUSB ${extraArgs})
|
|
+include(CMakeFindDependencyMacro)
|
|
+find_dependency(JPEG ${extraArgs})
|
|
include("${CMAKE_CURRENT_LIST_DIR}/libuvcTargets.cmake")
|
|
|
|
set(libuvc_FOUND TRUE)
|