Skip to content

Commit e5e7972

Browse files
authored
Additional cmake cleanup (#5952)
* Remove more set(build X). * Don't check if "build" var exists, as it doesn't. * 2d doesn't depend on vtk. * People doesn't depend on vtk. * Check if QTX is empty, ie. WITH_QT = NO. * Cleanup apps * Revert "Don't check if "build" var exists, as it doesn't." This reverts commit 79e3bac. It does indeed exists. * Rename FALSE to OFF and TRUE to ON. * Unify and clean the 5 apps. Default all to OFF.
1 parent 4ab87d4 commit e5e7972

File tree

47 files changed

+49
-138
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+49
-138
lines changed

2d/CMakeLists.txt

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@ set(SUBSYS_NAME 2d)
22
set(SUBSYS_DESC "Point cloud 2d")
33
set(SUBSYS_DEPS common filters)
44

5-
set(build TRUE)
65
PCL_SUBSYS_OPTION(build "${SUBSYS_NAME}" "${SUBSYS_DESC}" ON)
7-
PCL_SUBSYS_DEPEND(build NAME ${SUBSYS_NAME} DEPS ${SUBSYS_DEPS} OPT_DEPS vtk)
6+
PCL_SUBSYS_DEPEND(build NAME ${SUBSYS_NAME} DEPS ${SUBSYS_DEPS})
87

98
PCL_ADD_DOC("${SUBSYS_NAME}")
109

@@ -30,10 +29,6 @@ set(impl_incs
3029
"include/pcl/${SUBSYS_NAME}/impl/morphology.hpp"
3130
)
3231

33-
if(${VTK_FOUND})
34-
set(VTK_IO_TARGET_LINK_LIBRARIES vtkCommon vtkWidgets vtkIO vtkImaging)
35-
endif()
36-
3732
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/include")
3833

3934
set(LIB_NAME "pcl_${SUBSYS_NAME}")

apps/3d_rec_framework/CMakeLists.txt

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,11 @@ set(SUBSUBSYS_NAME 3d_rec_framework)
22
set(SUBSUBSYS_DESC "3D recognition framework")
33
set(SUBSUBSYS_DEPS common geometry io filters sample_consensus segmentation visualization kdtree features surface octree registration keypoints tracking search recognition ml)
44
set(SUBSUBSYS_EXT_DEPS vtk openni)
5+
set(REASON "")
6+
set(DEFAULT OFF)
57

68
if(NOT TARGET Boost::filesystem)
7-
set(DEFAULT FALSE)
89
set(REASON "Boost filesystem is not available.")
9-
else()
10-
set(DEFAULT TRUE)
11-
endif()
12-
13-
# Default to not building for now
14-
if(${DEFAULT} STREQUAL "TRUE")
15-
set(DEFAULT FALSE)
1610
endif()
1711

1812
PCL_SUBSUBSYS_OPTION(build "${SUBSYS_NAME}" "${SUBSUBSYS_NAME}" "${SUBSUBSYS_DESC}" ${DEFAULT} "${REASON}")

apps/CMakeLists.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@ set(SUBSYS_DESC "Application examples/samples that show how PCL works")
33
set(SUBSYS_DEPS common geometry io filters sample_consensus segmentation visualization kdtree features surface octree registration keypoints tracking search recognition ml stereo 2d)
44
set(SUBSYS_OPT_DEPS openni vtk ${QTX})
55

6-
set(DEFAULT FALSE)
7-
set(REASON "Disabled by default")
8-
PCL_SUBSYS_OPTION(build "${SUBSYS_NAME}" "${SUBSYS_DESC}" ${DEFAULT} "${REASON}")
6+
PCL_SUBSYS_OPTION(build "${SUBSYS_NAME}" "${SUBSYS_DESC}" OFF)
97
PCL_SUBSYS_DEPEND(build NAME ${SUBSYS_NAME} DEPS ${SUBSYS_DEPS} OPT_DEPS ${SUBSYS_OPT_DEPS})
108

119
if(NOT build)

apps/cloud_composer/CMakeLists.txt

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,16 @@ set(SUBSUBSYS_NAME cloud_composer)
77
set(SUBSUBSYS_DESC "Cloud Composer - Application for Manipulating Point Clouds")
88
set(SUBSUBSYS_DEPS common io visualization filters apps)
99
set(SUBSUBSYS_EXT_DEPS vtk ${QTX})
10+
set(REASON "")
11+
set(DEFAULT OFF)
1012

11-
# QVTK?
12-
if(NOT HAVE_QVTK)
13-
set(DEFAULT AUTO_OFF)
14-
set(REASON "Cloud composer requires QVTK")
15-
elseif(NOT ${DEFAULT} STREQUAL "AUTO_OFF")
16-
set(DEFAULT TRUE)
17-
set(REASON)
13+
# Have Qt?
14+
if("${QTX}" STREQUAL "")
15+
set(REASON "Cloud composer requires Qt.")
1816
endif()
1917

20-
#Default to not building for now
21-
if("${DEFAULT}" STREQUAL "TRUE")
22-
set(DEFAULT FALSE)
18+
if(NOT HAVE_QVTK)
19+
set(REASON "VTK was not built with Qt support.")
2320
endif()
2421

2522
PCL_SUBSUBSYS_OPTION(build "${SUBSYS_NAME}" "${SUBSUBSYS_NAME}" "${SUBSUBSYS_DESC}" ${DEFAULT} "${REASON}")

apps/in_hand_scanner/CMakeLists.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ set(SUBSUBSYS_DESC "In-hand scanner for small objects")
33
set(SUBSUBSYS_DEPS common features io kdtree apps)
44
set(SUBSUBSYS_LIBS pcl_common pcl_features pcl_io pcl_kdtree)
55
set(SUBSUBSYS_EXT_DEPS ${QTX} OpenGL OpenGL_GLU openni)
6+
set(REASON "")
7+
set(DEFAULT OFF)
68

7-
################################################################################
8-
9-
# Default to not building for now
10-
if(${DEFAULT} STREQUAL "TRUE")
11-
set(DEFAULT FALSE)
9+
# Have Qt?
10+
if("${QTX}" STREQUAL "")
11+
set(REASON "Cloud composer requires Qt.")
1212
endif()
1313

1414
pcl_subsubsys_option(build "${SUBSYS_NAME}" "${SUBSUBSYS_NAME}" "${SUBSUBSYS_DESC}" ${DEFAULT} "${REASON}")

apps/modeler/CMakeLists.txt

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,15 @@ set(SUBSUBSYS_DESC "PCLModeler: PCL based reconstruction platform")
33
set(SUBSUBSYS_DEPS common geometry io filters sample_consensus segmentation visualization kdtree features surface octree registration keypoints tracking search apps)
44
set(SUBSUBSYS_EXT_DEPS vtk ${QTX})
55
set(REASON "")
6+
set(DEFAULT OFF)
67

78
# QVTK?
89
if(NOT HAVE_QVTK)
9-
set(DEFAULT AUTO_OFF)
1010
set(REASON "VTK was not built with Qt support.")
11-
elseif(NOT ${DEFAULT} STREQUAL "AUTO_OFF")
12-
set(DEFAULT TRUE)
13-
set(REASON)
1411
endif()
1512

16-
# Default to not building for now
17-
if(${DEFAULT} STREQUAL "TRUE")
18-
set(DEFAULT FALSE)
13+
if(NOT HAVE_QVTK)
14+
set(REASON "VTK was not built with Qt support.")
1915
endif()
2016

2117
PCL_SUBSUBSYS_OPTION(build "${SUBSYS_NAME}" "${SUBSUBSYS_NAME}" "${SUBSUBSYS_DESC}" ${DEFAULT} "${REASON}")

apps/point_cloud_editor/CMakeLists.txt

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,8 @@ set(SUBSUBSYS_NAME point_cloud_editor)
22
set(SUBSUBSYS_DESC "Point Cloud Editor - Simple editor for 3D point clouds")
33
set(SUBSUBSYS_DEPS common filters io apps)
44
set(SUBSUBSYS_EXT_DEPS vtk ${QTX} OpenGL)
5-
6-
# Default to not building for now
7-
if(${DEFAULT} STREQUAL "TRUE")
8-
set(DEFAULT FALSE)
9-
endif()
5+
set(REASON "")
6+
set(DEFAULT OFF)
107

118
PCL_SUBSUBSYS_OPTION(build "${SUBSYS_NAME}" "${SUBSUBSYS_NAME}" "${SUBSUBSYS_DESC}" ${DEFAULT} "${REASON}")
129
PCL_SUBSYS_DEPEND(build NAME ${SUBSUBSYS_NAME} PARENT_NAME ${SUBSYS_NAME} DEPS ${SUBSUBSYS_DEPS} EXT_DEPS ${SUBSUBSYS_EXT_DEPS})

benchmarks/CMakeLists.txt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
set(SUBSYS_NAME benchmarks)
22
set(SUBSYS_DESC "Point cloud library benchmarks")
33
set(SUBSYS_DEPS common filters features search kdtree io)
4-
set(DEFAULT OFF)
5-
set(build TRUE)
6-
set(REASON "Disabled by default")
7-
PCL_SUBSYS_OPTION(build "${SUBSYS_NAME}" "${SUBSYS_DESC}" ${DEFAULT} "${REASON}")
4+
5+
PCL_SUBSYS_OPTION(build "${SUBSYS_NAME}" "${SUBSYS_DESC}" OFF)
86
PCL_SUBSYS_DEPEND(build NAME ${SUBSYS_NAME} DEPS ${SUBSYS_DEPS})
97
if(NOT build)
108
return()

cuda/common/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ set(SUBSYS_PATH cuda/common)
33
set(SUBSYS_DESC "Point cloud CUDA common library")
44
set(SUBSYS_DEPS)
55

6-
set(build TRUE)
76
PCL_SUBSYS_OPTION(build ${SUBSYS_NAME} ${SUBSYS_DESC} ON)
87
mark_as_advanced("BUILD_${SUBSYS_NAME}")
98
PCL_SUBSYS_DEPEND(build NAME ${SUBSYS_NAME} DEPS ${SUBSYS_DEPS})

cuda/features/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ set(SUBSYS_DEPS cuda_common io common)
55

66
# ---[ Point Cloud Library - pcl/cuda/io
77

8-
set(build TRUE)
98
PCL_SUBSYS_OPTION(build "${SUBSYS_NAME}" "${SUBSYS_DESC}" ON)
109
mark_as_advanced("BUILD_${SUBSYS_NAME}")
1110
PCL_SUBSYS_DEPEND(build NAME ${SUBSYS_NAME} DEPS ${SUBSYS_DEPS})

0 commit comments

Comments
 (0)