diff --git a/scripts/cmake/vcpkg_fixup_pkgconfig.cmake b/scripts/cmake/vcpkg_fixup_pkgconfig.cmake index a629ac8c91f40c..c6384f33a3bfdc 100644 --- a/scripts/cmake/vcpkg_fixup_pkgconfig.cmake +++ b/scripts/cmake/vcpkg_fixup_pkgconfig.cmake @@ -159,17 +159,17 @@ function(vcpkg_fixup_pkgconfig) # --static. if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") # Libs comes before Libs.private - string(REGEX REPLACE "(^|\n)(Libs: [^\n]*)(.*)\nLibs.private:( [^\n]*)" "\\1\\2\\4\\3" _contents "${_contents}") + string(REGEX REPLACE "(^|\n)(Libs: *[^\n]*)(.*)\nLibs.private:( *[^\n]*)" "\\1\\2\\4\\3" _contents "${_contents}") # Libs.private comes before Libs - string(REGEX REPLACE "(^|\n)Libs.private:( [^\n]*)(.*\nLibs: [^\n]*)" "\\3\\2" _contents "${_contents}") + 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}") + string(REGEX REPLACE "(^|\n)Libs.private: *" "\\1Libs: " _contents "${_contents}") # Requires comes before Requires.private - string(REGEX REPLACE "(^|\n)(Requires: [^\n]*)(.*)\nRequires.private:( [^\n]*)" "\\1\\2\\4\\3" _contents "${_contents}") + string(REGEX REPLACE "(^|\n)(Requires: *[^\n]*)(.*)\nRequires.private:( *[^\n]*)" "\\1\\2\\4\\3" _contents "${_contents}") # Requires.private comes before Requires - string(REGEX REPLACE "(^|\n)Requires.private:( [^\n]*)(.*\nRequires: [^\n]*)" "\\3\\2" _contents "${_contents}") + string(REGEX REPLACE "(^|\n)Requires.private:( *[^\n]*)(.*\nRequires: *[^\n]*)" "\\3\\2" _contents "${_contents}") # Only Requires.private - string(REGEX REPLACE "(^|\n)Requires.private: " "\\1Requires: " _contents "${_contents}") + string(REGEX REPLACE "(^|\n)Requires.private: *" "\\1Requires: " _contents "${_contents}") endif() file(WRITE "${_file}" "prefix=\${pcfiledir}/${RELATIVE_PC_PATH}\n${_contents}") unset(PKG_LIB_SEARCH_PATH)