[CMake] "portable" linux binaries?

Alexander Neundorf a.neundorf-work at gmx.net
Tue Nov 24 13:47:05 EST 2009


On Tuesday 24 November 2009, j s wrote:
> The most interesting thing is to be able to set the relative RPATH.
>
> Is there a way to do this for a normal build, and not the install target? 
> I never use the install target for my project, but I'd like to be able to
> set the relative path to my own copy of libstdc++.  All of the RPATH
> settings in the man page for cmake 2.4 seem to be in terms of INSTALL.

I think you can set the rpath relative to the containing ELF file 
using "$ORIGIN" in the path.

If you want to build directly with the install (or custom) rpath, you can set 
BUILD_WITH_INSTALL_RPATH to TRUE and then set INSTALL_RPATH as you like.

Alex


More information about the CMake mailing list