tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
pkgsStatic.protobuf: fix installation of protoc
Tobias Mayer
3 years ago
41963339
97889527
+20
2 changed files
expand all
collapse all
unified
split
pkgs
development
libraries
protobuf
generic-v3-cmake.nix
static-executables-have-no-rpath.patch
+2
pkgs/development/libraries/protobuf/generic-v3-cmake.nix
···
53
53
url = "https://github.com/protocolbuffers/protobuf/commit/a7324f88e92bc16b57f3683403b6c993bf68070b.patch";
54
54
sha256 = "sha256-SmwaUjOjjZulg/wgNmR/F5b8rhYA2wkKAjHIOxjcQdQ=";
55
55
})
56
56
+
] ++ lib.optionals stdenv.hostPlatform.isStatic [
57
57
+
./static-executables-have-no-rpath.patch
56
58
];
57
59
58
60
nativeBuildInputs = let
+18
pkgs/development/libraries/protobuf/static-executables-have-no-rpath.patch
···
1
1
+
diff --git a/cmake/install.cmake b/cmake/install.cmake
2
2
+
index 26a55be8b..b6823c3f9 100644
3
3
+
--- a/cmake/install.cmake
4
4
+
+++ b/cmake/install.cmake
5
5
+
@@ -32,13 +32,6 @@ if (protobuf_BUILD_PROTOC_BINARIES)
6
6
+
install(TARGETS protoc EXPORT protobuf-targets
7
7
+
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT protoc
8
8
+
BUNDLE DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT protoc)
9
9
+
- if (UNIX AND NOT APPLE)
10
10
+
- set_property(TARGET protoc
11
11
+
- PROPERTY INSTALL_RPATH "$ORIGIN/../${CMAKE_INSTALL_LIBDIR}")
12
12
+
- elseif (APPLE)
13
13
+
- set_property(TARGET protoc
14
14
+
- PROPERTY INSTALL_RPATH "@loader_path/../lib")
15
15
+
- endif()
16
16
+
endif (protobuf_BUILD_PROTOC_BINARIES)
17
17
+
18
18
+
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/protobuf.pc ${CMAKE_CURRENT_BINARY_DIR}/protobuf-lite.pc DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")