I sometimes try to build repositories which use find_package()
for their dependencies, but - their packages have no find scripts in the repo or in CMake's own set of find scripts; nor do these dependencies - when installed as Linux distribution packages - come with .cmake
files . But - those packages are installed on my system and one can find them with pkg-config - compilation flags and linking flags (and maybe other stuff).
Now, I can of course manually add pkg-config lines to my file, as described in this ansawer among others. But that would mean I have to mess with ever single repository I have this issue with.
What I would like to do is to tell CMake, on the command-line, that it should also use pkg-config
to search for packages when I specify find-package()
- to make my life easier.