This repository has been archived by the owner on Sep 24, 2024. It is now read-only.
forked from conan-io/conan-center-index
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from valgur/feature/AddPCL
PCL: further PR fixes
- Loading branch information
Showing
4 changed files
with
184 additions
and
70 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
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
66 changes: 43 additions & 23 deletions
66
recipes/pcl/all/patches/0001-cmake_use_conan_targets.patch
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 |
---|---|---|
@@ -1,32 +1,52 @@ | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -319,6 +319,6 @@ endif() | ||
@@ -297,7 +297,7 @@ | ||
# OpenMP (optional) | ||
option(WITH_OPENMP "Build with parallelization using OpenMP" TRUE) | ||
if(WITH_OPENMP) | ||
- find_package(OpenMP COMPONENTS C CXX) | ||
+ find_package(OpenMP REQUIRED COMPONENTS C CXX) | ||
endif() | ||
if(OpenMP_FOUND) | ||
string(APPEND CMAKE_C_FLAGS " ${OpenMP_C_FLAGS}") | ||
@@ -319,11 +319,11 @@ | ||
find_package(Threads REQUIRED) | ||
|
||
# Eigen (required) | ||
-find_package(Eigen 3.3 REQUIRED) | ||
+find_package(EIGEN REQUIRED) | ||
+find_package(EIGEN REQUIRED CONFIG) | ||
include_directories(SYSTEM ${EIGEN_INCLUDE_DIRS}) | ||
|
||
--- a/common/CMakeLists.txt | ||
+++ b/common/CMakeLists.txt | ||
@@ -4,7 +4,7 @@ set(SUBSYS_DEPS) | ||
# FLANN (required) | ||
-find_package(FLANN 1.9.1 REQUIRED) | ||
+find_package(FLANN REQUIRED CONFIG) | ||
if(NOT (${FLANN_LIBRARY_TYPE} MATCHES ${PCL_FLANN_REQUIRED_TYPE}) AND NOT (${PCL_FLANN_REQUIRED_TYPE} MATCHES "DONTCARE")) | ||
message(FATAL_ERROR "Flann was selected with ${PCL_FLANN_REQUIRED_TYPE} but found as ${FLANN_LIBRARY_TYPE}") | ||
endif() | ||
@@ -359,7 +359,7 @@ | ||
# LibPNG | ||
option(WITH_PNG "PNG file support" TRUE) | ||
if(WITH_PNG) | ||
- find_package(PNG) | ||
+ find_package(PNG REQUIRED CONFIG) | ||
if(PNG_FOUND) | ||
set(HAVE_PNG ON) | ||
include_directories(SYSTEM "${PNG_INCLUDE_DIR}") | ||
@@ -369,7 +369,7 @@ | ||
# Qhull | ||
option(WITH_QHULL "Include convex-hull operations" TRUE) | ||
if(WITH_QHULL) | ||
- find_package(Qhull) | ||
+ find_package(QHULL REQUIRED CONFIG) | ||
if(NOT (${QHULL_LIBRARY_TYPE} MATCHES ${PCL_QHULL_REQUIRED_TYPE}) AND NOT (${PCL_QHULL_REQUIRED_TYPE} MATCHES "DONTCARE")) | ||
message(FATAL_ERROR "Qhull was selected with ${PCL_QHULL_REQUIRED_TYPE} but found as ${QHULL_LIBRARY_TYPE}") | ||
endif() | ||
@@ -404,7 +404,7 @@ | ||
#Find PCAP | ||
option(WITH_PCAP "pcap file capabilities in Velodyne HDL driver" TRUE) | ||
if(WITH_PCAP) | ||
- find_package(Pcap) | ||
+ find_package(PCAP REQUIRED CONFIG) | ||
endif() | ||
|
||
set(build TRUE) | ||
PCL_SUBSYS_OPTION(build "${SUBSYS_NAME}" "${SUBSYS_DESC}" ON) | ||
-PCL_SUBSYS_DEPEND(build NAME ${SUBSYS_NAME} DEPS ${SUBSYS_DEPS} EXT_DEPS eigen boost) | ||
+PCL_SUBSYS_DEPEND(build NAME ${SUBSYS_NAME} DEPS ${SUBSYS_DEPS} EXT_DEPS EIGEN Boost) | ||
|
||
PCL_ADD_DOC("${SUBSYS_NAME}") | ||
|
||
--- a/io/CMakeLists.txt | ||
+++ b/io/CMakeLists.txt | ||
@@ -1,7 +1,7 @@ | ||
set(SUBSYS_NAME io) | ||
set(SUBSYS_DESC "Point cloud IO library") | ||
set(SUBSYS_DEPS common octree) | ||
-set(SUBSYS_EXT_DEPS boost eigen) | ||
+set(SUBSYS_EXT_DEPS Boost EIGEN) | ||
|
||
set(build TRUE) | ||
PCL_SUBSYS_OPTION(build "${SUBSYS_NAME}" "${SUBSYS_DESC}" ON) | ||
# OpenGL and GLUT |
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,32 @@ | ||
--- cmake/Modules/FindOpenNI.cmake | ||
+++ cmake/Modules/FindOpenNI.cmake | ||
@@ -52,7 +52,12 @@ | ||
|
||
# Libraries | ||
if(NOT WIN32) | ||
- find_package(libusb REQUIRED) | ||
+ find_package(libusb QUIET) | ||
+ if (NOT libusb_FOUND) | ||
+ message(WARNING "Found OpenNI library, but required libusb is not available") | ||
+ set(OPENNI_FOUND FALSE) | ||
+ return() | ||
+ endif() | ||
set(OPENNI_LIBRARIES ${OPENNI_LIBRARY} libusb::libusb) | ||
else() | ||
set(OPENNI_LIBRARIES ${OPENNI_LIBRARY}) | ||
--- cmake/Modules/FindOpenNI2.cmake | ||
+++ cmake/Modules/FindOpenNI2.cmake | ||
@@ -42,7 +42,12 @@ | ||
|
||
# Libraries | ||
if(NOT WIN32) | ||
- find_package(libusb REQUIRED) | ||
+ find_package(libusb QUIET) | ||
+ if (NOT libusb_FOUND) | ||
+ message(WARNING "Found OpenNI2 library, but required libusb is not available") | ||
+ set(OPENNI2_FOUND FALSE) | ||
+ return() | ||
+ endif() | ||
set(OPENNI2_LIBRARIES ${OPENNI2_LIBRARY} libusb::libusb) | ||
else() | ||
set(OPENNI2_LIBRARIES ${OPENNI2_LIBRARY}) |