[CMake] padding link arguments to the linker

Mike Jackson imikejackson at gmail.com
Wed Feb 8 19:28:02 EST 2006


On Feb 8, 2006, at 7:21 PM, Brad King wrote:

> Mike Jackson wrote:
>>>> The -install_name option is _already_ being specified by cmake    
>>>> somewhere so when I tried your suggestion, I get an error  
>>>> during  link  phase that the -install_name option is being  
>>>> specified twice.
>>>> Is there a master config file somewhere for cmake that I can  
>>>> just   edit? How else would cmake know to put in this option?
>>>
>>> CMake uses the install_name to approximate UNIX rpaths in the  
>>> build  tree.  You will want to set VTK_USE_RPATH to OFF.   
>>> Otherwise there  is no install option anyway.
>> It _is_ off. Should I try a clean build at this point?
>
> Oops, I forgot that -install_name is also used when RPATH is off  
> but it just doesn't include any path.  You can do this in the build  
> tree to get rid of it:
>
> cmake . -DCMAKE_SHARED_LIBRARY_SONAME_C_FLAG:STRING= \
>         -DCMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG:STRING=
>
> You could also edit Darwin.cmake in the CMake installation to get  
> rid of these flags.  Also if you're using Xcode for the build they  
> shouldn't be showing up anyway.  If they are please send me the  
> complete link line it uses.
>
> The right way to do this is to add a CMake feature to allow an  
> explicit install_name to be specified and then update VTK to take  
> advantage of the feature.  To get this done you'll have to add the  
> feature requests I mentioned earlier.
>
> -Brad

So if I turn on RPATH, and rpath uses -install_name, where do I  
actually specify the RPATH to use? or can I specify the path at all?

--------
Mike Jackson
imikejackson <at> gmail <dot> com





More information about the CMake mailing list