All, I've been beating my head over this for about 3 days now and haven't gotten anywhere. There have been a few discussions on topics related to this question but nothing has gotten me a 100% solution (yet). I have created a StackOverflow post to see if I could get anything there but have yet to get any hits yet:
http://stackoverflow.com/q/27261288/408160 My problem is this: I am using ExternalProject to add a project that gets built by make. I want the libs that come out of this project to be linked in with apps and libs I have in my project (I have created a sample project here: https://github.com/calebwherry/cmake-superprj-main-test). The external lib compiles correctly but the issue is with how it is linked to my apps and libs: whenever I do ldd on them the path shows up as relative for the external lib. This means that is cannot be run anywhere but from the directory CMake puts it. Setting LD_LIBRARY_PATH or messing with RPATH does not effect the external lib, it always shows up with a relative path like so: libTestLib.so => /home/jwherry3/repos/cmake-superprj-main-test/build/src/lib/TestLib/libTestLib.so (0x00007f592da57000) ../../lib/libExtLib.so (0x00007f592d855000) The first lib (libTestLib.so) is the one built with CMake in the superproject and the second (libExtLib.so) is the external lib. I have no idea how to get it NOT to do this. I think it is potentially something wrong with how I am interfacing with the ExternalProject target but am not sure. The github example is fully compilable and exhibits the undesired behavior (Debian Wheezy 64-bit, CMake 3.0.1, g++-4.9.2). Thanks for the help! Caleb -- J. Caleb Wherry *Scientific Software Engineer* <http://www.calebwherry.com> http://www.calebwherry.com +1 (615) 708-5651 [email protected]
-- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake
