Skip to content
  • James Le Cuirot's avatar
    build: Generate better pkg-config files for static-only builds · 93e8bb2a
    James Le Cuirot authored
    pkg-config supports `Requires.private` and `Libs.private` fields for
    static linking. However, if you're building a dynamic binary, then
    pkg-config will use the non-private fields, even if just the static
    libxml2 is available. This will result in libxml2 being underlinked,
    causing the build to fail. The solution is to fold the private fields
    into the non-private fields when the shared libxml2 is not being built.
    
    This works for Autotools and CMake. Meson also knows how to handle this
    when it automatically generates pkg-config files.
    93e8bb2a