From fdf8d175ffeab0ab3acb849faf9d5c26a54e141d Mon Sep 17 00:00:00 2001 From: "Matthias C. M. Troffaes" Date: Mon, 24 May 2021 12:45:40 +0100 Subject: [PATCH 1/2] [doc] document vcpkg_fixup_pkgconfig merging behaviour --- docs/maintainers/vcpkg_fixup_pkgconfig.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/maintainers/vcpkg_fixup_pkgconfig.md b/docs/maintainers/vcpkg_fixup_pkgconfig.md index dbfa2d42392629..e94453d7298489 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 From 20eeeaa18227711d41286f73b2cd6c00fbc066a5 Mon Sep 17 00:00:00 2001 From: "Matthias C. M. Troffaes" Date: Mon, 24 May 2021 13:06:37 +0100 Subject: [PATCH 2/2] [doc] add source --- scripts/cmake/vcpkg_fixup_pkgconfig.cmake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/cmake/vcpkg_fixup_pkgconfig.cmake b/scripts/cmake/vcpkg_fixup_pkgconfig.cmake index a629ac8c91f40c..8f18b766a8cfe1 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