Hello,

Is there any way to tell cmake to use relative paths when linking an executable? Here some info about a sample exec:

$ otool -L ./rtmpserver/rtmpserver
./rtmpserver/rtmpserver:
/Users/shiretu/work/crtmpserver/trunk/builders/cmake/thelib/ libthelib.dylib (compatibility version 0.0.0, current version 0.0.0) /usr/lib/libssl.0.9.8.dylib (compatibility version 0.9.8, current version 0.9.8) /usr/lib/libcrypto.0.9.8.dylib (compatibility version 0.9.8, current version 0.9.8) /Users/shiretu/work/crtmpserver/trunk/builders/cmake/common/ libcommon.dylib (compatibility version 0.0.0, current version 0.0.0) /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.9.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 124.1.1)


What I want is to transform

/Users/shiretu/work/crtmpserver/trunk/builders/cmake/thelib/ libthelib.dylib (compatibility version 0.0.0, current version 0.0.0)

into

thelib/libthelib.dylib (compatibility version 0.0.0, current version 0.0.0)

So, when I do

TARGET_LINK_LIBRARIES(rtmpserver thelib.....) is there any way to tell cmake to build the Makefile in such a way that the final executable will have relative references to the used libraries?

I only want to do that for the libraries in my project, not all of them (ibSystem.B.dylib,libstdc++.6.dylib, etc) should remain the same

Thank you


_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to