[CMake] Setting XCode Runtime Search Path

Andreas Stahl andreas.stahl at tu-dresden.de
Wed Feb 20 05:54:52 EST 2013


Hello Darrell,

you can also set it as a property per target

set_target_properties(MyExecutable 
    PROPERTIES
    XCODE_ATTRIBUTE_LD_RUNPATH_SEARCH_PATHS "@loader_path;@loader_path/../lib"
)

This should work, but I think CMake could use some facilities to handle the executables runpath search path on os x and the DT_RPATH / DT_RUNPATH in linux. 
best regards,
Andreas

Am 20.02.2013 um 11:39 schrieb Darrell Blake:

> Hmm. I've just tried this but it didn't work for me. The "Runpath Search Path" field is still blank.
> 
> Do I have to do things in a particular order to get it to work? Though I have tried moving it around and still couldn't get it to work.
> 
> Darrell
> 
> 
> On 20 February 2013 00:17, Alexey Petruchik <i100500 at gmail.com> wrote:
> Hi, I'm doing this by adding:
> set(CMAKE_XCODE_ATTRIBUTE_LD_RUNPATH_SEARCH_PATHS "@executable_path/../Frameworks")
> to my CMakeLists.txt. Not sure that this is the way it should be done but at least it works ;)
> 
> Regards, Alexey
> 
> 
> On Wed, Feb 20, 2013 at 1:13 AM, Darrell Blake <darrell.blake at gmail.com> wrote:
> Is there any way to set the XCode "Runtime Search Path" linker setting? I've got a framework that was built using @rpath so I'm having to set the Runtime Search Path setting to @executable_path/../Frameworks so it can be found. I just wondered if there was any way to set it from CMake.
> 
> Darrell
> 
> 
> --
> 
> 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
> 
> 
> --
> 
> 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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4681 bytes
Desc: not available
URL: <http://www.cmake.org/pipermail/cmake/attachments/20130220/abd28406/attachment.bin>


More information about the CMake mailing list