File tree Expand file tree Collapse file tree 6 files changed +47
-13
lines changed
Expand file tree Collapse file tree 6 files changed +47
-13
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,13 @@ set(SUBSUBSYS_DESC "3D recognition framework")
33set (SUBSUBSYS_DEPS common geometry io filters sample_consensus segmentation visualization kdtree features surface octree registration keypoints tracking search recognition ml)
44set (SUBSUBSYS_EXT_DEPS vtk openni)
55
6+ if (NOT TARGET Boost::filesystem)
7+ set (DEFAULT FALSE )
8+ set (REASON "Boost filesystem is not available." )
9+ else ()
10+ set (DEFAULT TRUE )
11+ endif ()
12+
613# Default to not building for now
714if (${DEFAULT} STREQUAL "TRUE" )
815 set (DEFAULT FALSE )
Original file line number Diff line number Diff line change @@ -19,16 +19,25 @@ set(Boost_ADDITIONAL_VERSIONS
1919 "1.74.0" "1.74" "1.73.0" "1.73" "1.72.0" "1.72" "1.71.0" "1.71" "1.70.0" "1.70"
2020 "1.69.0" "1.69" "1.68.0" "1.68" "1.67.0" "1.67" "1.66.0" "1.66" "1.65.1" "1.65.0" "1.65" )
2121
22- # Optional boost modules
23- find_package (Boost 1.65.0 QUIET COMPONENTS serialization mpi)
24- if (Boost_SERIALIZATION_FOUND)
25- set (BOOST_SERIALIZATION_FOUND TRUE )
22+ if (CMAKE_CXX_STANDARD MATCHES "14" )
23+ # Optional boost modules
24+ set (BOOST_OPTIONAL_MODULES serialization mpi)
25+ # Required boost modules
26+ set (BOOST_REQUIRED_MODULES filesystem iostreams system )
27+ else ()
28+ # Optional boost modules
29+ set (BOOST_OPTIONAL_MODULES filesystem serialization mpi)
30+ # Required boost modules
31+ set (BOOST_REQUIRED_MODULES iostreams system )
2632endif ()
2733
28- # Required boost modules
29- set (BOOST_REQUIRED_MODULES filesystem iostreams system )
34+ find_package (Boost 1.65.0 QUIET COMPONENTS ${BOOST_OPTIONAL_MODULES} )
3035find_package (Boost 1.65.0 REQUIRED COMPONENTS ${BOOST_REQUIRED_MODULES} )
3136
37+ if (Boost_SERIALIZATION_FOUND)
38+ set (BOOST_SERIALIZATION_FOUND TRUE )
39+ endif ()
40+
3241if (Boost_FOUND)
3342 set (BOOST_FOUND TRUE )
3443endif ()
Original file line number Diff line number Diff line change @@ -85,7 +85,10 @@ foreach(_ss ${PCL_SUBSYSTEMS_MODULES})
8585endforeach ()
8686
8787#Boost modules
88- set (PCLCONFIG_AVAILABLE_BOOST_MODULES "system filesystem iostreams" )
88+ set (PCLCONFIG_AVAILABLE_BOOST_MODULES "system iostreams" )
89+ if (Boost_FILESYSTEM_FOUND)
90+ string (APPEND PCLCONFIG_AVAILABLE_BOOST_MODULES " filesystem" )
91+ endif ()
8992if (Boost_SERIALIZATION_FOUND)
9093 string (APPEND PCLCONFIG_AVAILABLE_BOOST_MODULES " serialization" )
9194endif ()
@@ -101,4 +104,4 @@ install(FILES
101104 "${PCL_BINARY_DIR} /PCLConfig.cmake"
102105 "${PCL_BINARY_DIR} /PCLConfigVersion.cmake"
103106 COMPONENT pclconfig
104- DESTINATION ${PCLCONFIG_INSTALL_DIR} )
107+ DESTINATION ${PCLCONFIG_INSTALL_DIR} )
Original file line number Diff line number Diff line change @@ -343,7 +343,10 @@ PCL_ADD_LIBRARY(${LIB_NAME} COMPONENT ${SUBSYS_NAME} SOURCES ${srcs} ${incs} ${c
343343
344344target_include_directories (${LIB_NAME} PUBLIC "${CMAKE_CURRENT_SOURCE_DIR} /include" )
345345
346- target_link_libraries ("${LIB_NAME} " Boost::boost Boost::filesystem Boost::iostreams pcl_common pcl_io_ply)
346+ target_link_libraries ("${LIB_NAME} " Boost::boost Boost::iostreams pcl_common pcl_io_ply)
347+ if (TARGET Boost::filesystem)
348+ target_link_libraries ("${LIB_NAME} " Boost::filesystem)
349+ endif ()
347350
348351if (VTK_FOUND)
349352 if (${VTK_VERSION} VERSION_GREATER_EQUAL 9.0)
Original file line number Diff line number Diff line change @@ -2,8 +2,14 @@ set(SUBSYS_NAME outofcore)
22set (SUBSYS_DESC "Point cloud outofcore library" )
33set (SUBSYS_DEPS common io filters octree visualization)
44
5- set (build TRUE )
6- PCL_SUBSYS_OPTION(build "${SUBSYS_NAME} " "${SUBSYS_DESC} " ON )
5+ if (NOT TARGET Boost::filesystem)
6+ set (DEFAULT FALSE )
7+ set (REASON "Boost filesystem is not available." )
8+ else ()
9+ set (DEFAULT TRUE )
10+ endif ()
11+
12+ PCL_SUBSYS_OPTION(build "${SUBSYS_NAME} " "${SUBSYS_DESC} " ${DEFAULT} "${REASON} " )
713PCL_SUBSYS_DEPEND(build NAME ${SUBSYS_NAME} DEPS ${SUBSYS_DEPS} )
814
915PCL_ADD_DOC("${SUBSYS_NAME} " )
Original file line number Diff line number Diff line change @@ -2,8 +2,14 @@ set(SUBSYS_NAME recognition)
22set (SUBSYS_DESC "Point cloud recognition library" )
33set (SUBSYS_DEPS common io search kdtree octree features filters registration sample_consensus ml)
44
5- set (build TRUE )
6- PCL_SUBSYS_OPTION(build "${SUBSYS_NAME} " "${SUBSYS_DESC} " ON )
5+ if (${PCL_VERSION} VERSION_LESS "1.15.0" AND NOT TARGET Boost::filesystem)
6+ set (DEFAULT FALSE )
7+ set (REASON "Boost filesystem is not available." )
8+ else ()
9+ set (DEFAULT TRUE )
10+ endif ()
11+
12+ PCL_SUBSYS_OPTION(build "${SUBSYS_NAME} " "${SUBSYS_DESC} " ${DEFAULT} "${REASON} " )
713PCL_SUBSYS_DEPEND(build NAME ${SUBSYS_NAME} DEPS ${SUBSYS_DEPS} )
814
915PCL_ADD_DOC("${SUBSYS_NAME} " )
You can’t perform that action at this time.
0 commit comments