2

When I use target_link_libraries to try link in the same directory instead of put a relative path (.), it means when I compile the software and run readelf command I see the full library like /home/mypath/project/mylib.so, but when I execute my program in other compile the home path change and the link is broken, so I would like that when I compile the program the relative path was put instead of the full path, someone knows to do it with CMake?

Alex
  • 3,301
  • 4
  • 29
  • 43
  • 1
    This might be best solved by installing your executable, and using the info from this question/answer to fix the "rpath" in your installed executable: http://stackoverflow.com/q/22206122/1401351 – Peter Jul 03 '14 at 19:55

0 Answers0