[CMake] Problem with FindXercesC.cmake
Dorier, Matthieu
mdorier at anl.gov
Thu Sep 27 17:34:35 EDT 2018
Hi,
I'm using cmake 3.11.4 and the FindXercesC.cmake file shipped with it.
When I call find_package(XercesC REQUIRED) and XercesC is not in a standard location, I have to set XercesC_INCLUDE_DIR to its include directory and XercesC_LIBRARY to the location of the library.
If I set XercesC_LIBRARY to the directory containing the library (not to the fullpath of the library itself), cmake finds XercesC but sets XercesC_LIBRARIES to the folder instead of the library, and the same for the XercesC::XercesC target. It seems I truly have to set XercesC_LIBRARY to the name of the library rather than the path to the folder containing it, which kinds of defies the point of find_package...
I use to rely on a custom FindXercesC.cmake file that was using XercesC_ROOT to figure all this out. Is there any way to do the same here?
Thanks,
Matthieu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake/attachments/20180927/cc8106cd/attachment-0001.html>
More information about the CMake
mailing list