diff --git a/ports/protobuf/portfile.cmake b/ports/protobuf/portfile.cmake index 9c2d9ee561d8a9..0a1d3cd4d3d393 100644 --- a/ports/protobuf/portfile.cmake +++ b/ports/protobuf/portfile.cmake @@ -9,6 +9,7 @@ vcpkg_from_github( fix-default-proto-file-path.patch fix-utf8-range.patch fix-arm64-msvc.patch + protobuf-module-cmake.diff ) string(COMPARE EQUAL "${TARGET_TRIPLET}" "${HOST_TRIPLET}" protobuf_BUILD_PROTOC_BINARIES) diff --git a/ports/protobuf/protobuf-module-cmake.diff b/ports/protobuf/protobuf-module-cmake.diff new file mode 100644 index 00000000000000..6c5b012d8fce1b --- /dev/null +++ b/ports/protobuf/protobuf-module-cmake.diff @@ -0,0 +1,27 @@ +diff --git a/cmake/protobuf-module.cmake.in b/cmake/protobuf-module.cmake.in +index 0bb05e3..694eafe 100644 +--- a/cmake/protobuf-module.cmake.in ++++ b/cmake/protobuf-module.cmake.in +@@ -95,14 +95,18 @@ function(_protobuf_find_libraries name filename) + # Honor cache entry used by CMake 3.5 and lower. + set(${name}_LIBRARIES "${${name}_LIBRARY}" PARENT_SCOPE) + elseif(TARGET protobuf::lib${filename}) ++ set(location "LOCATION") ++ if(WIN32 AND "@protobuf_BUILD_SHARED_LIBS@") ++ set(location "IMPORTED_IMPLIB") ++ endif() + get_target_property(${name}_LIBRARY_RELEASE protobuf::lib${filename} +- LOCATION_RELEASE) ++ ${location}_RELEASE) + get_target_property(${name}_LIBRARY_RELWITHDEBINFO protobuf::lib${filename} +- LOCATION_RELWITHDEBINFO) ++ ${location}_RELWITHDEBINFO) + get_target_property(${name}_LIBRARY_MINSIZEREL protobuf::lib${filename} +- LOCATION_MINSIZEREL) ++ ${location}_MINSIZEREL) + get_target_property(${name}_LIBRARY_DEBUG protobuf::lib${filename} +- LOCATION_DEBUG) ++ ${location}_DEBUG) + + select_library_configurations(${name}) + set(${name}_LIBRARY ${${name}_LIBRARY} PARENT_SCOPE) diff --git a/ports/protobuf/vcpkg.json b/ports/protobuf/vcpkg.json index 2b4bfcf4a29ed3..7cc7b42044bf5b 100644 --- a/ports/protobuf/vcpkg.json +++ b/ports/protobuf/vcpkg.json @@ -1,6 +1,7 @@ { "name": "protobuf", "version": "5.26.1", + "port-version": 1, "description": "Google's language-neutral, platform-neutral, extensible mechanism for serializing structured data.", "homepage": "https://github.com/protocolbuffers/protobuf", "license": "BSD-3-Clause", diff --git a/versions/baseline.json b/versions/baseline.json index 95ea51913c7010..9bd5fdde1fbe44 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -7218,7 +7218,7 @@ }, "protobuf": { "baseline": "5.26.1", - "port-version": 0 + "port-version": 1 }, "protobuf-c": { "baseline": "1.5.0", diff --git a/versions/p-/protobuf.json b/versions/p-/protobuf.json index 736eb7885f020f..dce5e8a215318a 100644 --- a/versions/p-/protobuf.json +++ b/versions/p-/protobuf.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "104fb3fccc87e19f57267674318cfa1aa26054be", + "version": "5.26.1", + "port-version": 1 + }, { "git-tree": "f518549cd75b0c7c421b855f73f425fa13ba606a", "version": "5.26.1",