[CMake] absolute rpath

Alexander Neundorf a.neundorf-work at gmx.net
Tue Mar 4 16:10:32 EST 2008


On Friday 29 February 2008, Alexander Neundorf wrote:
> On Wednesday 27 February 2008, Jörg Becker wrote:
> > On Monday, 25. February 2008 20:44:13 Alexander Neundorf wrote:
> > > > > Use:
> > > > > set_target_properties(hello PROPERTIES  INSTALL_RPATH . )
> > > >
> > > > This doesn't work, too. The problem may be, that I don't understand
> > > > the path expansion in cmake (or it is buggy). I tried the following
> > > > things (with set_target_properties its the same) using cmake 2.4.8:
> > > >
> > > > set( CMAKE_INSTALL_RPATH "." )  -> rpath is set to source
> > > > CMAKE_SOURCE_DIR set( CMAKE_INSTALL_RPATH ".:." )  -> rpath is set to
> > > > ".:"
> > > > set( CMAKE_INSTALL_RPATH "foo:." )  -> rpath is set to source
> > > > CMAKE_SOURCE_DIR/foo:.
> > >
> > > Did you alkso try it using the target properties ?
> > > It seemed to work here.
> >
> > Yes, I tried it. '.' is expanded by to source dir. And also the other
> > expansions are the same. If I use ".;." (cmake path delimiter) instead
> > of ".:." (unix path delimiter), the resulting rpath ist
> > CMAKE_SOURCE_DIR:CMAKE_SOURCE_DIR.
> >
> > I'm using cmake version 2.4-patch 8 from suse backports for suse 10.3.
>
> Hmm, I will try again here.

Indeed, with cmake 2.4.6 and 2.4.8 "." is expanded to the current dir, with 
cmake cvs HEAD it stays "." in the executable (is this then actually relative 
to the location of the executable or to the current working directory ?)

Alex


More information about the CMake mailing list