Skip to content

Commit 03925ea

Browse files
committed
Rename dependency variables to what is actually used in find_package calls.
add AVX compile options to libraries. Add alias naming with namespace prefix. Add export of PCLTargets.
1 parent 09edd2a commit 03925ea

File tree

10 files changed

+74
-441
lines changed

10 files changed

+74
-441
lines changed

CMakeLists.txt

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,11 @@ include("${PCL_SOURCE_DIR}/cmake/pcl_verbosity.cmake")
9595
include("${PCL_SOURCE_DIR}/cmake/pcl_targets.cmake")
9696
include("${PCL_SOURCE_DIR}/cmake/pcl_options.cmake")
9797
include("${PCL_SOURCE_DIR}/cmake/clang-format.cmake")
98+
include("${PCL_SOURCE_DIR}/cmake/pcl_utils.cmake")
99+
DISSECT_VERSION()
100+
GET_OS_INFO()
101+
SET_INSTALL_DIRS()
102+
98103

99104
if(${PCL_ENABLE_CCACHE})
100105
include (UseCompilerCache)
@@ -247,11 +252,6 @@ if(CMAKE_COMPILER_IS_CLANG)
247252
set(CLANG_LIBRARIES "stdc++")
248253
endif()
249254

250-
include("${PCL_SOURCE_DIR}/cmake/pcl_utils.cmake")
251-
DISSECT_VERSION()
252-
GET_OS_INFO()
253-
SET_INSTALL_DIRS()
254-
255255
if(WIN32)
256256
set(PCL_RESOURCES_DIR "${PCL_SOURCE_DIR}/resources")
257257
set(PCL_POINTCLOUDS_DIR "${PCL_RESOURCES_DIR}/pointclouds")
@@ -487,7 +487,7 @@ unset(CMAKE_REQUIRED_LIBRARIES)
487487

488488
### --[ Set variables for pcl_config.h
489489
if (BUILD_visualization)
490-
set(PCL_VISUALIZATION_AVAILABLE TRUE)
490+
set(visualization_AVAILABLE TRUE)
491491
endif()
492492

493493
### ---[ Create the config.h file
@@ -506,6 +506,13 @@ foreach(subdir ${PCL_MODULES_DIRS})
506506
add_subdirectory("${PCL_SOURCE_DIR}/${subdir}")
507507
endforeach()
508508

509+
510+
install(
511+
EXPORT PCLTargets
512+
NAMESPACE PCL::
513+
DESTINATION cmake
514+
)
515+
509516
### ---[ Documentation
510517
add_subdirectory(doc)
511518

0 commit comments

Comments
 (0)