RPATHs missing on link line for versioned libraries (.so.MAJOR.MINOR.PATCH)
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
When linking against a library using the full path to a versioned .so
file, the RPATH (-Wl,-rpath,/full/path
or equivalent) is missing from the link line. It does work when using the non-versioned library ending in .so
Build CGAL 4.7, which exports libCGAL.so.11.0.1
as CGAL_LIBRARY
in its CGALExports.cmake
.
Use in your CMake project similar to the following:
find_package( CGAL REQUIRED )
# ...
target_link_libraries( my_exe ${CGAL_LIBRARY} )