mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-22 12:04:40 +00:00
pkgsStatic.protobuf: fix installation of protoc
This commit is contained in:
parent
978895272f
commit
41963339b9
@ -53,6 +53,8 @@ let
|
||||
url = "https://github.com/protocolbuffers/protobuf/commit/a7324f88e92bc16b57f3683403b6c993bf68070b.patch";
|
||||
sha256 = "sha256-SmwaUjOjjZulg/wgNmR/F5b8rhYA2wkKAjHIOxjcQdQ=";
|
||||
})
|
||||
] ++ lib.optionals stdenv.hostPlatform.isStatic [
|
||||
./static-executables-have-no-rpath.patch
|
||||
];
|
||||
|
||||
nativeBuildInputs = let
|
||||
|
@ -0,0 +1,18 @@
|
||||
diff --git a/cmake/install.cmake b/cmake/install.cmake
|
||||
index 26a55be8b..b6823c3f9 100644
|
||||
--- a/cmake/install.cmake
|
||||
+++ b/cmake/install.cmake
|
||||
@@ -32,13 +32,6 @@ 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)
|
||||
- set_property(TARGET protoc
|
||||
- PROPERTY INSTALL_RPATH "$ORIGIN/../${CMAKE_INSTALL_LIBDIR}")
|
||||
- elseif (APPLE)
|
||||
- set_property(TARGET protoc
|
||||
- PROPERTY INSTALL_RPATH "@loader_path/../lib")
|
||||
- endif()
|
||||
endif (protobuf_BUILD_PROTOC_BINARIES)
|
||||
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/protobuf.pc ${CMAKE_CURRENT_BINARY_DIR}/protobuf-lite.pc DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
|
Loading…
Reference in New Issue
Block a user