INSTALL_RPATH property does not escape dollar signs in install script
add_executable(exe exe.c)
set_property(TARGET exe INSTALL_RPATH "\${ORIGIN}/../lib")
This gets written as ${ORIGIN}
in cmake_install.cmake
, which then gets expanded as a CMake variable. Avoiding this requires double-escaping the dollar sign like so:
add_executable(exe exe.c)
set_property(TARGET exe INSTALL_RPATH "\\\${ORIGIN}/../lib")