aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias C. M. Troffaes <matthias.troffaes@gmail.com>2021-06-05 00:49:02 +0100
committerGitHub <noreply@github.com>2021-06-04 16:49:02 -0700
commitbec883fef498206f05b20bc0a4ba241637657dba (patch)
tree61736f46595c7579ba0d658da31b77ecbe7a870f
parent750c0bdc90016ecd3305540cff134f64ecf7009b (diff)
downloadvcpkg-bec883fef498206f05b20bc0a4ba241637657dba.tar.gz
vcpkg-bec883fef498206f05b20bc0a4ba241637657dba.zip
[doc] document vcpkg_fixup_pkgconfig merging behaviour (#18091)
* [doc] document vcpkg_fixup_pkgconfig merging behaviour * [doc] add source
-rw-r--r--docs/maintainers/vcpkg_fixup_pkgconfig.md6
-rw-r--r--scripts/cmake/vcpkg_fixup_pkgconfig.cmake6
2 files changed, 10 insertions, 2 deletions
diff --git a/docs/maintainers/vcpkg_fixup_pkgconfig.md b/docs/maintainers/vcpkg_fixup_pkgconfig.md
index dbfa2d423..e94453d72 100644
--- a/docs/maintainers/vcpkg_fixup_pkgconfig.md
+++ b/docs/maintainers/vcpkg_fixup_pkgconfig.md
@@ -2,7 +2,11 @@
The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_fixup_pkgconfig.md).
-Fix common paths in *.pc files and make everything relative to $(prefix)
+Fix common paths in *.pc files and make everything relative to $(prefix).
+Additionally, on static triplets, private entries are merged with their non-private counterparts,
+allowing pkg-config to be called without the ``--static`` flag.
+Note that vcpkg is designed to never have to call pkg-config with the ``--static`` flag,
+since a consumer cannot know if a dependent library has been built statically or not.
## Usage
```cmake
diff --git a/scripts/cmake/vcpkg_fixup_pkgconfig.cmake b/scripts/cmake/vcpkg_fixup_pkgconfig.cmake
index c6384f33a..3f37099a7 100644
--- a/scripts/cmake/vcpkg_fixup_pkgconfig.cmake
+++ b/scripts/cmake/vcpkg_fixup_pkgconfig.cmake
@@ -1,7 +1,11 @@
#[===[.md:
# vcpkg_fixup_pkgconfig
-Fix common paths in *.pc files and make everything relative to $(prefix)
+Fix common paths in *.pc files and make everything relative to $(prefix).
+Additionally, on static triplets, private entries are merged with their non-private counterparts,
+allowing pkg-config to be called without the ``--static`` flag.
+Note that vcpkg is designed to never have to call pkg-config with the ``--static`` flag,
+since a consumer cannot know if a dependent library has been built statically or not.
## Usage
```cmake