Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[protobuf] fix dynamic build #25744

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
diff --git a/cmake/install.cmake b/cmake/install.cmake
index 825cb25..4f453d6 100644
index 825cb25..390b42a 100644
--- a/cmake/install.cmake
+++ b/cmake/install.cmake
@@ -32,7 +32,7 @@ if (protobuf_BUILD_PROTOC_BINARIES)
@@ -32,9 +32,9 @@ if (protobuf_BUILD_PROTOC_BINARIES)
install(TARGETS protoc EXPORT protobuf-targets
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT protoc
BUNDLE DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT protoc)
- if (UNIX AND NOT APPLE)
+ if (UNIX AND NOT APPLE AND NOT protobuf_MSVC_STATIC_RUNTIME)
set_property(TARGET protoc
PROPERTY INSTALL_RPATH "$ORIGIN/../${CMAKE_INSTALL_LIBDIR}")
- PROPERTY INSTALL_RPATH "$ORIGIN/../${CMAKE_INSTALL_LIBDIR}")
+ PROPERTY INSTALL_RPATH "$ORIGIN:$ORIGIN/../${CMAKE_INSTALL_LIBDIR}:$ORIGIN/../../${CMAKE_INSTALL_LIBDIR}")
elseif (APPLE)
set_property(TARGET protoc
PROPERTY INSTALL_RPATH "@loader_path/../lib")
2 changes: 1 addition & 1 deletion ports/protobuf/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ vcpkg_from_github(
SHA512 41503e70094ea6a8355c3ef16cfd998b38edb99f3d98e27be197583d42933a6805566e3efc7311af7453bb3d40d51eb589c67324676a31ec86b3ce80000bcb98
HEAD_REF master
PATCHES
fix-static-build.patch
fix-vcpkg-dynamic-build.patch
fix-default-proto-file-path.patch
)

Expand Down
1 change: 1 addition & 0 deletions ports/protobuf/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "protobuf",
"version-semver": "3.21.2",
"port-version": 1,
"description": "Protocol Buffers - Google's data interchange format",
"homepage": "https://github.com/protocolbuffers/protobuf",
"license": "BSD-3-Clause",
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -5642,7 +5642,7 @@
},
"protobuf": {
"baseline": "3.21.2",
"port-version": 0
"port-version": 1
},
"protobuf-c": {
"baseline": "1.4.0",
Expand Down
5 changes: 5 additions & 0 deletions versions/p-/protobuf.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "05844eacdcc993397444130dde165bc2b1eef487",
"version-semver": "3.21.2",
"port-version": 1
},
{
"git-tree": "8ae2a5d57f7d3bf934e4d773406cd0a323600031",
"version-semver": "3.21.2",
Expand Down