cezs / jtx1inst

A custom C API for instrumenting Jetson TX1’s SoM and SoC
The Unlicense
8 stars 3 forks source link

cmake ignores -DCMAKE_INSTALL_RPATH #5

Open fnoop opened 6 years ago

fnoop commented 6 years ago

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.

lucize commented 5 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 \