CPack: file RPATH_CHANGE could not write new RPATH
I have a project that links against OpenCV found via find_package
mechanism using the package config from OpenCV's build directory. If I run cpack
on my project, cpack
outputs the following error:
CMake Error at /home/sd/Projects/proj/build/cmake_install.cmake:49 (file):
file RPATH_CHANGE could not write new RPATH:
to the file:
/home/sd/Projects/proj/build/_CPack_Packages/Linux/DEB/proj-0.1.1-Linux/usr/bin/myapp
The current RPATH is:
/home/sd/Projects/opencv/build/lib
which does not contain:
/home/sd/Projects/opencv/build/lib:
as was expected.
If I remove the trailing colon from cmake_install.cmake
in the rpath above within the generated file(RPATH_CHANGE)
call, cpack
succeeds.
Edited by Sergiu Deitsch