
(2) and maintainer of Foo do not want (or are not ready) to transition to CMake. This is for example what was done for Qt5, it now provides a config-file package.

action: I suggest to improve their build system.(b) but do NOT provide a config-file package.Now if the library Foois not already using CMake, there are options: This will import CMake targets that you can link against your own libraries or executables. Generally speaking, if the library Foo is already using CMake and already provide a config-file package, configuring your project with -DFoo_DIR:PATH=/path/to/build-or-install-dir/ allow you to call find_package(Foo REQUIRED) from your own project.

If you are looking into integrating libraries that are not built within the scope of your project, the first step is to make sure the libraries all provide a config-file package.Ī config-file package usually include files like FooConfig.cmake, FooConfigVersion.cmake and FooTargets.cmake. Answering this question requires to cover few aspects, you will find below two sections:
