Use cmake instead of pkg-config to find packages in dunecontrol
The library pkg-config
is used to distinguish if a module is already installed or not. With this information, it give a defines precedence for the modules to include in case of double definitions.
The issue with pkg-config
-
De-facto dependency: The website hints that
pkg-config
is an optional dependency. However, the reality is that using DUNE withoutdunecontrol
requires you to know how several internal things about DUNE. So, most of our users (specially newcomers), requiredunecontrol
to use DUNE at all Now, the problem is thatdunecontrol
depends inpkg-config
even though all of our documentations say its optional. I have fallen into this trap several times when creating minimal setups. -
Finds packages the
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.
Proposal
Make dune control find packages using cmake and use this to distinguish if a module is installed or not.