Skip to content

[CMake] Don't export XercesC_INCLUDE_DIR and similar.

Stephan Hageboeck requested to merge hageboeck/fixXercesFind into master

When installed, VecGeom was setting an include directory and library location for XercesC. These should normally be CACHE variables set by CMake, but here they were local variables valid only during the search of VecGeom dependencies. When a different package is trying to find XercesC again, the existence of the local variables prevents another find, effectively unsetting them. This leads to a CMake error stating that XercesC was found, but the required XercesC_INCLUDE_DIR is unset.

It should be OK to export XercesC_DIR, though. This will only have an effect if XercesC was found in config mode, and can help downstream packages to repeat the search.

This should fix https://its.cern.ch/jira/browse/VECGEOM-623, but it might break @seth 's attempt to export the full VecGeom config here: !1014 (merged).

Merge request reports