[vtkusers] Interacting with VTK under Mac OS X
Miguel Ángel Rodríguez Florido
marf at ctm.ulpgc.es
Thu Mar 15 08:46:29 EDT 2007
Just to not compile again (to build static libraries), I have done a
link to .dylib in /usr/local/bin (if I do "make install" it'll create an
"include" directory and it'll copy the headers files in), and another
for vtk (binary) in /usr/local/bin.
Now, everything works very well!!.
Thank you very much for your help/comments (specilly Sean and Mike).
Regards.
Sean McBride escribió:
> On 3/14/07 1:26 PM, Mike Jackson said:
>
>> Here is the deal. You have TWO choices. Pick ONE..
>>
>> 1) Build with RPATH=ON. This will encode the full path to the
>> libraries in each library. So basically, build VTK with RPATH=ON and
>> then DO NOT MOVE THE LIBRARIES from wherever cmake puts them. In
>> Xcode, you reference these libraries IN PLACE. This is what you want
>> to use when developing.
>>
>> 2) Build with RPATH=OFF but do a "make install". This will place the
>> libraries in /usr/local/lib by default and Encode in each library
>> where the library is located. This is what you want to use when
>> Deplorying your app to other people. You will need an installer than
>> places all the Vtk libs in /usr/local/lib for the user. While this
>> will work and some companies do it this way, this is really NOT the
>> mac way of doing things.
>>
>> And a few comments from below: OS X does NOT put the path in the
>> libraries name, the linker does only with flags that are set by CMake.
>>
>> What I would like to see are two more options for OS X:
>> 1) Do not encode ANY path in the libraries. OS X by DEFAULT will
>> look in /usr/lib and /usr/local/lib (preferable) for libraries. This
>> would be a better situation.
>> 2) Provide an option to set the "install_name" for the libraries,
>> or at least the prefix. I have my own hack in the OS X CMake module
>> that allows me to do this. Thus I can compile my VTK libs with a path
>> like the following: "@executable_path/../Libs" which allows me to
>> embed all the VTK libs in my .app package. This allows true "Drag and
>> Drop" installation of your application onto the OS X system. No
>> Installer needed.
>>
>> You should NOT have to mess with DYLD_LIBRARY_PATH environment
>> variables if this is setup correctly.
>
> For all these reasons, I always build VTK as static libraries, and
> simply add those static libs to my actual application's Xcode project.
>
--
Miguel Angel Rodriguez Florido
Center for Technology in Medicine-ULPGC-Gran Canaria-CanaryIslands,Spain
Emails:marf@{ctm.ulpgc.es,bwh.harvard.edu}-http://www.ctm.ulpgc.es/~marf
Tfnos:+34 928 451253, +34 928 452956 - Fax:+34 928 451243
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3237 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20070315/7bc2b678/attachment.bin>
More information about the vtkusers
mailing list