The library pkg-config
is used to distinguish if a module is already installed or not. With this information, it gives precedence for the modules to include in case of double definitions.
pkg-config
is an optional dependency. However, the reality is that using DUNE without dunecontrol
requires you to know how several internal things about DUNE. So, most of our users (specially newcomers), require dunecontrol
to use DUNE at all Now, the problem is that dunecontrol
depends in pkg-config
even though all of our documentations say its optional. I have fallen into this trap several times when creating minimal setups.pkg-config
way: It tries to find information extracting information from the .pc
files. But this is not how the build system in dune works. Our build system is built with cmake, that is to say that if cmake cannot find a package, it doesn't matter how does the .pc
file looks like. In other words, that's just a proxy for the real way to find dune modules.Make dune control find packages using cmake and use this to distinguish if a module is installed or not.