Open schweitzer opened 4 years ago
A reasonable request and solution. :+1:
If needed the PR is available.
Some corner cases needs to be tested (old CMake version, build on exotic OS, ...).
Let me know if something is wrong :smiley:
Marking this as stale due to 30 days of inactivity. It will be closed in 7 days if no further activity occurs.
Your Environment
Context
Hello, I've got a issue/question about how PCL handles external dependencies. I know that you recently change some piece of CMake code but in my opinion there is still a lack of "export" of external libraries (FLANN, VTK, ...) when using PCL COMPONENTS .
Expected Behavior
When I use PCL in a project I would like to do something like:
Current Behavior
But currently if I do what I explain in Expected Behavior there are plenty of external libraries that are missing.
We don't want to explicitly link
myProject
against FLANN, VTK or whatever since they are only needed by PCL.So I take a look in the PCLConfig.cmake.in file and it seems like there is all the needed information when parsing the PCL components here in the
${PCL_${COMPONENT}_LIBRARIES}
, but this variable is reset later in the script but never used.Possible Solution
What I suggest is to add
${PCL_${COMPONENT}_LIBRARIES}
in theINTERFACE_LINK_LIBRARIES
. That's what we have done here, this way PCL can be find using CMake target and external libraries such as FLANN seems to be transitive and hidden to final user.What do you think ? Did I miss a point ?