GNOME Bugzilla – Bug 523910
Use Requires.private in *.pc-file for pkg-config
Last modified: 2008-03-25 02:34:53 UTC
Please describe the problem: At the moment `pkg-config glibmm-2.4.pc --libs` returns: -lglibmm-2.4 -lgobject-2.0 -lsigc-2.0 -lglib-2.0 ...but there is usually no need to link against the extra libs when not linking statically. Using Requires.private in the *.pc-File helps here: - Requires: gobject-2.0 sigc++-2.0 + Requires.private: gobject-2.0 sigc++-2.0 This way, `pkg-config glibmm-2.4.pc --libs` returns: -lglibmm-2.4 and `pkg-config glibmm-2.4.pc --libs --static` returns: -lglibmm-2.4 -lgobject-2.0 -lsigc-2.0 -lglib-2.0 Tobias Steps to reproduce: Compile something with "pkg-config glibmm-2.4.pc --libs" Actual results: The resulting executable will be linked against libgobject-2.0 and linsigc-2.0, even if it doesn't use any symbols from these libs. Expected results: Does this happen every time? Other information:
Public headers of glibmm #include headers of glib and sigc++: those packages are required even when compiling in a dynamic environment.
yeah, I really don't think that we can do that. These libraries are exposed in the glibmm headers.