aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDawid Wróbel <me@dawidwrobel.com>2021-09-24 02:04:46 +0300
committerGitHub <noreply@github.com>2021-09-23 16:04:46 -0700
commit14c814bfc71a8a98cdb1739a09325deca58b98bd (patch)
tree4333312b7f7ffe4fb6919b385b1dbb79de26c067
parent7a9bfb28d35586bc02c0a96e190fe74d25445b47 (diff)
downloadvcpkg-14c814bfc71a8a98cdb1739a09325deca58b98bd.tar.gz
vcpkg-14c814bfc71a8a98cdb1739a09325deca58b98bd.zip
[vcpkg_fixup_pkgconfig] Add support for Cflags.private (#19852)
-rw-r--r--scripts/cmake/vcpkg_fixup_pkgconfig.cmake6
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/cmake/vcpkg_fixup_pkgconfig.cmake b/scripts/cmake/vcpkg_fixup_pkgconfig.cmake
index 3f37099a7..7557b5b1b 100644
--- a/scripts/cmake/vcpkg_fixup_pkgconfig.cmake
+++ b/scripts/cmake/vcpkg_fixup_pkgconfig.cmake
@@ -168,6 +168,12 @@ function(vcpkg_fixup_pkgconfig)
string(REGEX REPLACE "(^|\n)Libs.private:( *[^\n]*)(.*\nLibs: *[^\n]*)" "\\3\\2" _contents "${_contents}")
# Only Libs.private
string(REGEX REPLACE "(^|\n)Libs.private: *" "\\1Libs: " _contents "${_contents}")
+ # Cflags comes before Cflags.private
+ string(REGEX REPLACE "(^|\n)(Cflags: *[^\n]*)(.*)\nCflags.private:( *[^\n]*)" "\\1\\2\\4\\3" _contents "${_contents}")
+ # Cflags.private comes before Cflags
+ string(REGEX REPLACE "(^|\n)Cflags.private:( *[^\n]*)(.*\nCflags: *[^\n]*)" "\\3\\2" _contents "${_contents}")
+ # Only Cflags.private
+ string(REGEX REPLACE "(^|\n)Cflags.private: *" "\\1Cflags: " _contents "${_contents}")
# Requires comes before Requires.private
string(REGEX REPLACE "(^|\n)(Requires: *[^\n]*)(.*)\nRequires.private:( *[^\n]*)" "\\1\\2\\4\\3" _contents "${_contents}")
# Requires.private comes before Requires