[CMake] rpath linker args

Michael Ellery mellery451 at gmail.com
Fri May 19 20:03:15 EDT 2017


I’m wondering if anyone knows the details of rpath linker args. In particular, I have two paths in my CMAKE_BUILD_RPATH. On macOS, I end-up with something like this:

….  -Wl,rpath=/path/number/one -Wl,rpath=/path/number/two ….

and on linux with the same CMakeLists.txt file, I get:

…. -Wl,rpath=/path/number/one:/path/number/two … 

I can’t tell from man pages if that second form is even allowed or what the linker will do with it, but my observation is that the RPATH is indeed set for the macOS binary and it is NOT set for the linux binary. 

Thoughts/advice ? Anything else I can try to force the first format to be used on linux?

Thanks,
Mike Ellery



More information about the CMake mailing list