Rpath handling on Linux

The solution in the article below seems promising:

http://www.blaenkdenum.com/notes/cmake/#rpath

set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--disable-new-dtags")
set (CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
set (CMAKE_INSTALL_RPATH "$ORIGIN")
原文地址:https://www.cnblogs.com/len3d/p/5355189.html