Closed schuhschuh closed 8 years ago
I can confirm I've run into this problem in my own usage
Previous change works well for our MIRTK project and the change has been merged from the CMake BASIS Modules develop branch into the develop branch of this project.
When
basis_find_package
is called twice with a different list of package components, it calls CMake'sfind_package
twice with the different lists of components. Actually, most package configuration or Find module will then override the first<PKG>_LIBRARIES
and<PKD>_INCLUDE_DIRS
variables with only the libraries for the latter components. The second time,find_package
should be called with the union of the components to be looked for. Moreover, thebasis_use_package
command does not re-include the<PKG>_USE_FILE
a second time. Moreover, such use files often have an include guard themselves which prevents the second inclusion.An example is the VTK 6 library.