Commit 226a0ae
committed
build: use Requires.private for OpenSSL in static pkg-config file
Change Requires to Requires.private in the static library's .pc file.
Requires.private means pkg-config only exposes the dependency's flags
when the consumer passes --static. Without --static, the dependency
is ignored entirely. This is the correct semantics because:
- OpenSSL is an internal implementation detail, not exposed in the
public API headers. Consumers don't need OpenSSL's -I flags to
compile against the driver.
- Anyone linking the static .a should be using --static, which pulls
in Requires.private deps. So static consumers still get -lssl.
- If a consumer mistakenly uses the static .pc without --static
(e.g. linking the .a directly), Requires would needlessly add
OpenSSL flags that may conflict with their own OpenSSL usage.
This matches the convention used by OpenSSL's own libssl.pc, which
declares Requires.private: libcrypto rather than Requires:.1 parent ebff852 commit 226a0ae
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
0 commit comments