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")
3
3
set (SUBSUBSYS_DEPS common geometry io filters sample_consensus segmentation visualization kdtree features surface octree registration keypoints tracking search recognition ml )
4
4
set (SUBSUBSYS_EXT_DEPS vtk openni )
5
5
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
+
6
13
# Default to not building for now
7
14
if (${DEFAULT} STREQUAL "TRUE" )
8
15
set (DEFAULT FALSE )
Original file line number Diff line number Diff line change @@ -19,16 +19,25 @@ set(Boost_ADDITIONAL_VERSIONS
19
19
"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"
20
20
"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" )
21
21
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 )
26
32
endif ()
27
33
28
- # Required boost modules
29
- set (BOOST_REQUIRED_MODULES filesystem iostreams system )
34
+ find_package (Boost 1.65.0 QUIET COMPONENTS ${BOOST_OPTIONAL_MODULES} )
30
35
find_package (Boost 1.65.0 REQUIRED COMPONENTS ${BOOST_REQUIRED_MODULES} )
31
36
37
+ if (Boost_SERIALIZATION_FOUND )
38
+ set (BOOST_SERIALIZATION_FOUND TRUE )
39
+ endif ()
40
+
32
41
if (Boost_FOUND )
33
42
set (BOOST_FOUND TRUE )
34
43
endif ()
Original file line number Diff line number Diff line change @@ -85,7 +85,10 @@ foreach(_ss ${PCL_SUBSYSTEMS_MODULES})
85
85
endforeach ()
86
86
87
87
#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 ()
89
92
if (Boost_SERIALIZATION_FOUND )
90
93
string (APPEND PCLCONFIG_AVAILABLE_BOOST_MODULES " serialization" )
91
94
endif ()
@@ -101,4 +104,4 @@ install(FILES
101
104
"${PCL_BINARY_DIR} /PCLConfig.cmake"
102
105
"${PCL_BINARY_DIR} /PCLConfigVersion.cmake"
103
106
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
343
343
344
344
target_include_directories (${LIB_NAME} PUBLIC "${CMAKE_CURRENT_SOURCE_DIR} /include" )
345
345
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 ()
347
350
348
351
if (VTK_FOUND )
349
352
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)
2
2
set (SUBSYS_DESC "Point cloud outofcore library" )
3
3
set (SUBSYS_DEPS common io filters octree visualization )
4
4
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} " )
7
13
PCL_SUBSYS_DEPEND (build NAME ${SUBSYS_NAME} DEPS ${SUBSYS_DEPS} )
8
14
9
15
PCL_ADD_DOC ("${SUBSYS_NAME} " )
Original file line number Diff line number Diff line change @@ -2,8 +2,14 @@ set(SUBSYS_NAME recognition)
2
2
set (SUBSYS_DESC "Point cloud recognition library" )
3
3
set (SUBSYS_DEPS common io search kdtree octree features filters registration sample_consensus ml )
4
4
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} " )
7
13
PCL_SUBSYS_DEPEND (build NAME ${SUBSYS_NAME} DEPS ${SUBSYS_DEPS} )
8
14
9
15
PCL_ADD_DOC ("${SUBSYS_NAME} " )
You can’t perform that action at this time.
0 commit comments