GNOME Bugzilla – Bug 523907
Use Requires.private in *.pc-file for pkg-config
Last modified: 2008-06-12 10:36:02 UTC
At the moment `pkg-config libxml++-2.6 --libs` returns: -lxml++-2.6 -lxml2 -lglibmm-2.4 ...but there is usually no need to link agains libxml2 and libglibmm-2.4, when not linking statically. Using Requires.private in the *.pc-File helps here: - Requires: libxml-2.0 glibmm-2.4 + Requires.private: libxml-2.0 glibmm-2.4 This way, `pkg-config libxml++-2.6 --libs` returns: -lxml++-2.6 and `pkg-config libxml++-2.6 --libs --static` returns: -lxml++-2.6 -lxml2 -lz -lm -lglibmm-2.4 -lgobject-2.0 -lsigc-2.0 -lglib-2.0 Tobias
Could you submit a patch for this please, with a ChangeLog entry. I will apply it for libxml++ 2.23/24.
Looking at the headers installed (i.e., 'make install') for libxml++ 2.20.0, I see #include for several glibmm/*.h headers. That means glibmm is part of the public interface, not just an implementation detail. Even for dynamic linking again libxml++, one would need glibmm installed in order to have those #include work. libxml-2.0 seems safe to move to .private, but not glibmm-2.4
So, I guess this isn't a bug.