1
0
mirror of https://github.com/minio/minio-cpp.git synced 2026-10-23 07:48:55 +03:00
Files
Harshavardhana 92d8b2c3ec fix: complete the static link line in miniocpp.pc (#265)
miniocpp.pc declared only `Requires: libcrypto libssl pugixml zlib`, so
`pkg-config --static --libs miniocpp` omitted INIReader/inih and brotli,
and libs3rdma on an RDMA build. libminio.a carries undefined INIReader
and Brotli symbols, so a consumer linking from the .pc alone failed with
undefined references, and had to hand-maintain a parallel list instead.

The .pc cannot see target_link_libraries(), so the private dependencies
are now collected in miniocpp-deps.cmake, at the resolution branch that
knows which one was picked, and emitted as Requires.private/Libs.private.
A hardcoded second list would go stale the same way the first one did.

Requires.private is preferred over a bare -l because these archives live
in the dependency's own prefix, so only the module's own .pc supplies the
-L that finds them; the Libs.private fallback is for deps installed into
miniocpp's libdir, which -L${libdir} already covers. Nothing is named
that pkg-config could not resolve at configure time, so `--libs` for
dynamic consumers is byte for byte what it was.

Brotli reaches libminio.a through cpp-httplib rather than being declared
here, so it is emitted only when the resolved httplib actually enables
CPPHTTPLIB_BROTLI_SUPPORT.
2026-09-09 23:26:17 -07:00
..