[CMake] How to produce a -config.cmake file

Dorier, Matthieu mdorier at anl.gov
Thu Sep 27 04:41:52 EDT 2018


Hi,


I'm using cmake to build a library (damaris). Once installed, I would like users to be able to find it and its dependencies using find_package(damaris). If I understand correctly, the way to do that is to have cmake create and install a "damaris-config.cmake" file.


Is there a tutorial somewhere on how to do that?


Here is some more information:

the library depends on

- Boost (using the default FindBoost.cmake installed with cmake)

- XercesC (using a custom FindXercesC.cmake located in my source tree)

- XSD (using a custom FindXSD.cmake as well)

Additionally, it may have been built with the following optional dependencies:

- CppUnit (using a custom FindCppUnit.cmake)

- HDF5 (using the default FindHDF5.cmake shipped with cmake)

- VisIt (using a custom FindVisIt.cmake)

- ParaView (relying on the ParaViewConfig.cmake produced when installing ParaView).


Thanks,


Matthieu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake/attachments/20180927/e0e27d9d/attachment.html>


More information about the CMake mailing list