зеркало из https://github.com/microsoft/vcpkg.git
[vcpkg_fixup_pkgconfig] Fix handling of empty fields (#17898)
This commit is contained in:
Родитель
43df697b6b
Коммит
43ae0c9f9e
|
@ -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)
|
||||
|
|
Загрузка…
Ссылка в новой задаче