mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-25 18:18:23 +08:00
57 lines
2.1 KiB
Diff
57 lines
2.1 KiB
Diff
|
diff --git a/cmake/Modules/FindOpenNI.cmake b/cmake/Modules/FindOpenNI.cmake
|
||
|
index 249e896..eff0b95 100644
|
||
|
--- a/cmake/Modules/FindOpenNI.cmake
|
||
|
+++ b/cmake/Modules/FindOpenNI.cmake
|
||
|
@@ -51,9 +51,9 @@ if(OPENNI_INCLUDE_DIR AND OPENNI_LIBRARY)
|
||
|
mark_as_advanced(OPENNI_INCLUDE_DIRS)
|
||
|
|
||
|
# Libraries
|
||
|
- if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
||
|
- find_package(libusb REQUIRED)
|
||
|
- set(OPENNI_LIBRARIES ${OPENNI_LIBRARY} libusb::libusb)
|
||
|
+ if(NOT WIN32)
|
||
|
+ find_package(libusb CONFIG REQUIRED)
|
||
|
+ set(OPENNI_LIBRARIES ${OPENNI_LIBRARIES} ${LIBUSB_LIBRARIES})
|
||
|
else()
|
||
|
set(OPENNI_LIBRARIES ${OPENNI_LIBRARY})
|
||
|
endif()
|
||
|
diff --git a/cmake/Modules/FindOpenNI2.cmake b/cmake/Modules/FindOpenNI2.cmake
|
||
|
index 14ca206..8471067 100644
|
||
|
--- a/cmake/Modules/FindOpenNI2.cmake
|
||
|
+++ b/cmake/Modules/FindOpenNI2.cmake
|
||
|
@@ -41,9 +41,9 @@ if(OPENNI2_INCLUDE_DIR AND OPENNI2_LIBRARY)
|
||
|
mark_as_advanced(OPENNI2_INCLUDE_DIRS)
|
||
|
|
||
|
# Libraries
|
||
|
- if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
||
|
- find_package(libusb REQUIRED)
|
||
|
- set(OPENNI2_LIBRARIES ${OPENNI2_LIBRARY} libusb::libusb)
|
||
|
+ if(NOT WIN32)
|
||
|
+ find_package(libusb CONFIG REQUIRED)
|
||
|
+ set(OPENNI2_LIBRARIES ${OPENNI2_LIBRARY} ${LIBUSB_LIBRARIES})
|
||
|
else()
|
||
|
set(OPENNI2_LIBRARIES ${OPENNI2_LIBRARY})
|
||
|
endif()
|
||
|
diff --git a/io/CMakeLists.txt b/io/CMakeLists.txt
|
||
|
index ab91842..189063c 100644
|
||
|
--- a/io/CMakeLists.txt
|
||
|
+++ b/io/CMakeLists.txt
|
||
|
@@ -334,7 +334,7 @@ set(LIB_NAME "pcl_${SUBSYS_NAME}")
|
||
|
|
||
|
add_definitions(${VTK_DEFINES})
|
||
|
|
||
|
-PCL_ADD_LIBRARY(${LIB_NAME} COMPONENT ${SUBSYS_NAME} SOURCES ${srcs} ${incs} ${compression_incs} ${impl_incs} ${OPENNI_INCLUDES} ${OPENNI2_INCLUDES})
|
||
|
+PCL_ADD_LIBRARY(${LIB_NAME} COMPONENT ${SUBSYS_NAME} SOURCES ${srcs} ${incs} ${compression_incs} ${impl_incs} ${OPENNI_INCLUDES} ${OPENNI2_INCLUDES} ${LIBUSB_INCLUDE_DIRS})
|
||
|
|
||
|
target_include_directories(${LIB_NAME} PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include")
|
||
|
|
||
|
@@ -356,7 +356,7 @@ if(PNG_FOUND)
|
||
|
endif()
|
||
|
|
||
|
if(LIBUSB_FOUND)
|
||
|
- target_link_libraries("${LIB_NAME}" libusb::libusb)
|
||
|
+ target_link_libraries("${LIB_NAME}" ${LIBUSB_LIBRARIES})
|
||
|
endif()
|
||
|
|
||
|
if(WITH_OPENNI2)
|