Open fnoop opened 6 years ago
I know is late, but searched for this, days, and between searches I reached this comment, here how I solved the problem, also add:
-DCMAKE_BUILD_WITH_INSTALL_RPATH=TRUE \
-DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=BOTH \
-DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=BOTH \
If altering the destination install directory with -DCMAKE_INSTALL_PREFIX, sample binary doesn't run because -DCMAKE_INSTALL_RPATH is ignored, so no path to library.