Modernize cmake config template#6235
Conversation
|
With my current test, PCL_INCLUDE_DIRS and PCL_LIBRARY_DIRS are populated with: So maybe we can keep them as optional and indeed add the modern way as the primary approach. The values should be populated from the CONFIG script, at least with the root directory of PCL? |
bb7776c to
1aaf881
Compare
You are probably right, my description is probably false. I think we tried to link against the Components specific Variables. Which do not exist for all Components or something. |
The helper strings was not updated for 14 year and the mentioned Targets do not seem to exist. Update to use modern style.
1aaf881 to
57a22ef
Compare
|
How about the following description? I focuses on the new linking approach but still mentions PCL_INCLUDE_DIRS and PCL_LIBRARY_DIRS: # ------------------------------------------------------------------------------------
# Helper to use PCL from outside project
#
# Search for PCL:
# Request all PCL modules:
# find_package(PCL CONFIG REQUIRED)
# Or request only specific PCL modules:
# find_package(PCL CONFIG REQUIRED COMPONENTS xxx yyy)
#
# Link to PCL:
# Link to all found PCL modules:
# target_link_libraries(my_fabulous_target ${PCL_LIBRARIES})
# Or link only to specific modules:
# target_link_libraries(my_fabulous_target pcl_xxx pcl_yyy)
#
# Where xxx and yyy are module names from the following list:
# @PCLCONFIG_AVAILABLE_COMPONENTS_LIST@
#
# Some additional variables are set by PCLConfig.cmake, which are not needed when
# using the (modern) linking approach described above:
# PCL_INCLUDE_DIRS is filled with PCL and available 3rdparty headers
# PCL_LIBRARY_DIRS is filled with PCL components libraries install directory and
# 3rdparty libraries paths
#
# www.pointclouds.org
#------------------------------------------------------------------------------------ |
How about the following description? Looks like a good improvment? Shall I update the PR or are you already having this change somwhere? |
No, I just wrote it. It would be great if you could update this PR with that description. |
The helper strings was not updated for 14 year and the mentioned Targets do not seem to exist.
Update to use modern style.