about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/protobuf/static-executables-have-no-rpath.patch
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/protobuf/static-executables-have-no-rpath.patch')
-rw-r--r--nixpkgs/pkgs/development/libraries/protobuf/static-executables-have-no-rpath.patch18
1 files changed, 18 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/protobuf/static-executables-have-no-rpath.patch b/nixpkgs/pkgs/development/libraries/protobuf/static-executables-have-no-rpath.patch
new file mode 100644
index 000000000000..cd2474e14590
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/protobuf/static-executables-have-no-rpath.patch
@@ -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")