[protobuf] fix pc library reference (#38822)

This commit is contained in:
Frank 2024-05-25 02:39:45 +00:00 committed by GitHub
parent 05dd7ebf72
commit 248380e074
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 30 additions and 7 deletions

View File

@ -121,14 +121,32 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
endif()
vcpkg_copy_pdbs()
set(packages protobuf protobuf-lite)
foreach(_package IN LISTS packages)
set(_file "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/${_package}.pc")
if(EXISTS "${_file}")
vcpkg_replace_string(${_file} "-l${_package}" "-l${_package}d")
function(replace_package_string package)
set(debug_file "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/${package}.pc")
set(release_file "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/${package}.pc")
if(EXISTS "${release_file}")
if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
vcpkg_replace_string(${release_file} "-l${package}" "-llib${package}")
endif()
endif()
if(EXISTS "${debug_file}")
if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
vcpkg_replace_string(${debug_file} "-l${package}" "-llib${package}d")
else()
vcpkg_replace_string(${debug_file} "-l${package}" "-l${package}d")
endif()
endif()
endfunction()
set(packages protobuf protobuf-lite)
foreach(package IN LISTS packages)
replace_package_string(${package})
endforeach()
vcpkg_fixup_pkgconfig()
if(NOT protobuf_BUILD_PROTOC_BINARIES)

View File

@ -1,7 +1,7 @@
{
"name": "protobuf",
"version": "3.21.12",
"port-version": 2,
"port-version": 3,
"description": "Google's language-neutral, platform-neutral, extensible mechanism for serializing structured data.",
"homepage": "https://github.com/protocolbuffers/protobuf",
"license": "BSD-3-Clause",

View File

@ -6994,7 +6994,7 @@
},
"protobuf": {
"baseline": "3.21.12",
"port-version": 2
"port-version": 3
},
"protobuf-c": {
"baseline": "1.4.1",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "528c56d9b29635d840b284f3e2109a370556bd89",
"version": "3.21.12",
"port-version": 3
},
{
"git-tree": "e189106689c1983cd5e19363fa48f35d3d3f419b",
"version": "3.21.12",