[vtkusers] Building VTK and link arguments

Mathieu Malaterre mathieu.malaterre at kitware.com
Tue Feb 7 09:02:09 EST 2006


Martin Costabel wrote:
> Mike Jackson wrote:
> 
>> I am building the official VTK 5.x release on OS X and I would like to 
>> add a custom link argument for all the generated libraries. I am 
>> building dynamic libraries and I would like to set the "install-name" 
>> of each library to "@executable_path/../Plugins" so I can include the 
>> libs in my .app package. Normally I would set this in the Xcode build 
>> settings but since I am using cmake I have no idea where to set that.
> 
> 
> In the Fink package which uses cmake-2.0.5, there is the following cmake
> command line option
> 
>   -DCMAKE_SHARED_LINKER_FLAGS:STRING="-L%p/lib -install_name
> %p/lib/vtk/\`basename <TARGET>\`"
> 
> Here %p/lib/vtk is the directory where the libraries will be installed.
> This hack works, but it does not work with newer versions of cmake.
> 
> I would be interested, too, if someone found out how to transmit the 
> -install_name to the latest version of cmake. One can, of course, change 
> the install_name after the fact by running install_name_tool on all of 
> the vtk binaries and libs, but this is not a good solution.
> 

This sound like a CMake issue. Could you either forward that to CMake ML 
or open a bug report for that ?

Thanks
Mathieu



More information about the vtkusers mailing list