I am building libssh with cmake. I have two versions of OpenSSL on my system and need libssh to use the later version of OpenSSL, which is in /usr/local/ssl/lib. I need that rpath both before and after install, as libssh should always use that version of OpenSSL. To do that I've been passing LDFLAGS:

cmake -E env LDFLAGS="-Wl,-rpath=/usr/local/ssl/lib" cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DUNIT_TESTING=ON -DCMAKE_INSTALL_PREFIX=/usr/local -DOPENSSL_ROOT_DIR=/usr/local/ssl -DCMAKE_BUILD_TYPE=Debug ..

That works fine, but on install cmake says:

-- Set runtime path of "/usr/local/lib/libssh.so.4.8.1" to ""

However the rpath actually is in the file:

objdump -x /usr/local/lib/libssh.so.4.8.1 | grep RPATH
?? RPATH?????????????????????????????? /usr/local/ssl/lib

Is the message from cmake a bug or if not then is there a better way to pass rpath from the command line?

--

Powered by kitware.com/cmake

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit https://cmake.org/services

Visit other Kitware open-source projects at https://www.kitware.com/platforms

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake

This mailing list is deprecated in favor of https://discourse.cmake.org

Reply via email to