[CMake] Installed project with shared libs

Sean McBride sean at rogue-research.com
Fri Feb 24 12:00:13 EST 2006


On 2006-02-23 18:21, Brad King said:

>> Does this actually work on OS X? (Since he stated he was using
>> dylibs, which, afaik, are only on OS X or Darwin.)  AFAIK, the full path
>> to the library is always included in dylibs and you can't turn it off.
>> (See http://developer.apple.com/releasenotes/DeveloperTools/dyld.html
>> near the bottom where it lists "no rpath support".)
>> What do you do in this case?
>
>I'm actually in the middle of implementing this now.  You can in fact 
>turn it off and make the system use DYLD_LIBRARY_PATH to find it.  The 
>library is created with an "install_name" which is copied into targets 
>that link to it.  This name can be a full path or just a name.

It can also be one of a couple of 'special forms': @executable_path and
@loader_path.

Can/will cmake be able to support these forms?  For example, I'd like to
be able to build vtk as dylibs and then place said dylibs in my
application's bundle.  This means that the dylib's 'install_name' must
be "@executable_path/Contents/Frameworks/".

I also suggest that when cmake builds dylibs it always use the '-
headerpad_max_install_names' option so that the install_name can be
easily changed after the fact, if need be.  See the 'install_name_tool'
man page.

Thanks,

-- 
____________________________________________________________
Sean McBride, B. Eng                 sean at rogue-research.com
Rogue Research                        www.rogue-research.com 
Mac Software Developer              Montréal, Québec, Canada




More information about the CMake mailing list