Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions PCLConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -448,6 +448,20 @@ else(PCL_FIND_COMPONENTS)
set(PCL_FIND_ALL 1)
endif(PCL_FIND_COMPONENTS)

# We do not need to find components that have been found already, e.g. during previous invocation
# of find_package(PCL). Filter them out.
foreach(component ${PCL_TO_FIND_COMPONENTS})
if(NOT TARGET pcl_${component})
list(APPEND _PCL_TO_FIND_COMPONENTS ${component})
endif()
endforeach()
set(PCL_TO_FIND_COMPONENTS ${_PCL_TO_FIND_COMPONENTS})
unset(_PCL_TO_FIND_COMPONENTS)

if(NOT PCL_TO_FIND_COMPONENTS)
return()
endif()

compute_dependencies(PCL_TO_FIND_COMPONENTS)

# compute external dependencies per component
Expand Down