[CMake] install and rpath question

Mathieu Malaterre mathieu.malaterre at gmail.com
Tue Apr 24 05:37:03 EDT 2007


On 4/23/07, Andreas Schneider <mail at cynapses.org> wrote:
> Mathieu Malaterre wrote:
> > Hello,
> >
> >  I cannot figure out how to install a library so that the installed
> > version use the install_rpath.
> >
> > # By default rpath works in built tree:
> > ADD_LIBRARY(foo SHARED foo.c)
> > ADD_LIBRARY(bla SHARED bla.c)
> > TARGET_LINK_LIBRARIES(bla foo)
> > INSTALL(
> >  TARGETS bla foo
> >  LIBRARY DESTINATION lib
> > )
> >
> > SET_TARGET_PROPERTIES( bla
> >  PROPERTIES INSTALL_RPATH ???
> >  )
> >
> > In the end the rpath should be working in the build tree and in the
> > installed tree.
>
> Normally you shouldn't use rpath, add a file to /etc/ld.so.conf.d/ with
> the path in it.

Thanks ! Completely forgot about this solution...

-Mathieu


More information about the CMake mailing list