Browse Source

Fix RPATH when CMAKE_INSTALL_LIBDIR != lib.

In some platforms ${CMAKE_INSTALL_LIBDIR} expands to `lib64`. The libraries
are correctly installed in that directory, but the RPATH is set to point to
`$ORIGIN/../lib`, where it should be `$ORIGIN/../lib64`.
Carlos O'Ryan 6 years ago
parent
commit
b10d490efd
1 changed files with 1 additions and 1 deletions
  1. 1 1
      cmake/install.cmake

+ 1 - 1
cmake/install.cmake

@@ -33,7 +33,7 @@ if (protobuf_BUILD_PROTOC_BINARIES)
     RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT protoc)
   if (UNIX AND NOT APPLE)
     set_property(TARGET protoc
-      PROPERTY INSTALL_RPATH "$ORIGIN/../lib")
+      PROPERTY INSTALL_RPATH "$ORIGIN/../${CMAKE_INSTALL_LIBDIR}")
   elseif (APPLE)
     set_property(TARGET protoc
       PROPERTY INSTALL_RPATH "@loader_path/../lib")