-
Notifications
You must be signed in to change notification settings - Fork 6.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[pcl] Add feature and fix find libusb, fix pkgconfig (#21276)
* [pcl] Add feature and fix find libusb, fix pkgconfig * version * Re-fix libusb * version * Re-fix libusb * version * Add space to libs * version * Disable OPENNI, fix more pkgconfigs * Disable more options * Re-make patch * version
- Loading branch information
Showing
6 changed files
with
145 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
diff --git a/cuda/common/CMakeLists.txt b/cuda/common/CMakeLists.txt | ||
index b5775af..e7a2ff2 100644 | ||
--- a/cuda/common/CMakeLists.txt | ||
+++ b/cuda/common/CMakeLists.txt | ||
@@ -29,10 +29,10 @@ set(common_incs | ||
) | ||
|
||
include_directories(./include) | ||
-#set(LIB_NAME pcl_${SUBSYS_NAME}) | ||
+set(LIB_NAME "pcl_${SUBSYS_NAME}") | ||
set(EXT_DEPS CUDA) | ||
-#PCL_MAKE_PKGCONFIG(${LIB_NAME} ${SUBSYS_NAME} "${SUBSYS_DESC}" | ||
-# "${SUBSYS_DEPS}" "${EXT_DEPS}" "" "" "") | ||
+PCL_MAKE_PKGCONFIG(${LIB_NAME} COMPONENT ${SUBSYS_NAME} DESC "${SUBSYS_DESC}" | ||
+ PCL_DEPS "${SUBSYS_DEPS}" EXT_DEPS "" HEADER_ONLY) | ||
|
||
# Install include files | ||
PCL_ADD_INCLUDES(${SUBSYS_NAME} "cuda" ${incs}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters