-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PCLConfig.cmake should be define QHULL_USE_STATIC and FLANN_USE_STATIC #2084
Comments
I think that these options are necessary to define according to the build-time options. macro(find_qhull)
if(PCL_ALL_IN_ONE_INSTALLER)
set(QHULL_ROOT "${PCL_ROOT}/3rdParty/Qhull")
elseif(NOT QHULL_ROOT)
get_filename_component(QHULL_ROOT "@QHULL_INCLUDE_DIRS@" PATH)
endif(PCL_ALL_IN_ONE_INSTALLER)
+ set(QHULL_USE_STATIC @QHULL_USE_STATIC@)
find_package(Qhull)
endmacro(find_qhull) macro(find_flann)
if(PCL_ALL_IN_ONE_INSTALLER)
set(FLANN_ROOT "${PCL_ROOT}/3rdParty/Flann")
elseif(NOT FLANN_ROOT)
get_filename_component(FLANN_ROOT "@FLANN_INCLUDE_DIRS@" PATH)
endif(PCL_ALL_IN_ONE_INSTALLER)
+ set(FLANN_USE_STATIC @FLANN_USE_STATIC@)
find_package(FLANN)
endmacro(find_flann) |
Agree. Speaking of static/dynamic switches, can you please explain What about promoting |
👍 |
👍 - set(QHULL_USE_STATIC @QHULL_USE_STATIC@)
+ option(QHULL_USE_STATIC "Use Static Library of FLANN" @QHULL_USE_STATIC@) - set(FLANN_USE_STATIC @FLANN_USE_STATIC@)
+ option(FLANN_USE_STATIC "Use Static Library of QHull" @FLANN_USE_STATIC@) |
Oh, sorry, my proposal was misleading. I did not mean making Now coming back to the situation in the |
I understood. Agree. 👍
Boost, VTK(, and OpenNI2) always need to find libraries. |
Thinking about this more... we still need to find them to add their include directories, right?
I think your current PR is sufficient. In the case of static libraries we end up linking against them once again, but that does not hurt. |
Considering that we now have unified the find package scripts it would be complicated to address the "while building pcl" and the "while including pcl in your project" situations differently to prevent the libraries to be added. During the static linking, the compiler only links what is required i.e., we don't risk bloated binaries if we have a second static linkage right? |
OK, If include directories is necessary, It seems necessary to find those libraries.
PCL that included in PCL All-in-one Installer is linked dependencies of static library (other than OpenNI2). |
Aren't you missing defining |
To the best of my knowledge, yes.
I can take care of this (and removing old |
Superseeded by #2089. |
New PCLConfig.cmake doesn't include settings of
QHULL_USE_STATIC
(that using inModules/FindQHull.cmake
) andFLANN_USE_STATIC
(that using inModules/FindFLANN.cmake
).Therefore, PCLConfig.cmake always find dynamic link library of QHull and FLANN when configure user own project.
I think that PCLConfig.cmake should be define
QHULL_USE_STATIC
andFLANN_USE_STATIC
.In generally, I think users should be use libraries that used build PCL from source code.
@SergioRAgostinho @taketwo What do you think about it?
The text was updated successfully, but these errors were encountered: