[CMake] rpath

Tom Deblauwe tom.deblauwe at traficon.com
Wed Feb 1 08:21:39 EST 2012


Hello,

I have a question about cmake with makefiles and g++ on linux:
I have a single executable, consisting out of static libraries built by 
cmake. Now one of the static libraries needs a shared library which is 
not compiled by cmake but precompiled. I can link the one static lib 
with the shared lib and the whole executable compiles ok. But when 
running it, the shared lib is not found. So I need to set the rpath of 
my executable to look for the shared library. Will the following work:

set_target_properties(myOneStaticLib INSTALL_RPATH "../../bin/libs")

Or do I need to do more?

Best regards
Tom,


More information about the CMake mailing list