[CMake] Library Paths
Eric Noulard
eric.noulard at gmail.com
Mon Jul 19 13:59:00 EDT 2010
2010/7/19 <Michael.Schmidt at l-3com.com>:
> When I do an in-source build, everything runs ok. However, I have
> issues with an out-of-source build. One of my libraries uses another
> one of my libraries. When I run the executable it complains "cannot
> open shared object file: No such file or directory."
linking your executable to those libs or are you doing
something like "dlopen" inside your application?
> It's looking for the library in the source directory and not the build tree. I've read
> the wiki page on setting the rpath, but none of those combinations seem
> to work.
Are your speaking of this page:
http://www.cmake.org/Wiki/CMake_RPATH_handling ?
If yes it usually works for me with:
# use, i.e. don't skip the full RPATH for the build tree
SET(CMAKE_SKIP_BUILD_RPATH FALSE)
# when building, don't use the install RPATH already
# (but later on when installing)
SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
> I appreciate any help.
Which version of CMake ?
What is you platform ?
Supposing your are on Linux
Does it work if you setup LD_LIBRARY_PATH by hand?
Could you run
$ ldd yourapplication
--
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org
More information about the CMake
mailing list