[vtkusers] Interacting with VTK under Mac OS X

Martin Costabel costabel at wanadoo.fr
Sat Mar 17 19:01:24 EDT 2007


Brad King wrote:
[]

Many thanks for all these explanations. I got it working correctly now, 
I think.

> I do not know what the python setup.py way to do that is supposed to be. 
>  I used to install the python modules via CMake's install facility but 
> python people complained and told me to use setup.py.  One way to work 
> around the problem is to set CMAKE_BUILD_WITH_INSTALL_RPATH to true in 
> your cache (-DBUILD_WITH_INSTALL_RPATH:BOOL=1 on command line).  This 

I am using -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=1 which indeed does the 
trick.

> will make sure the libraries are all built in the source tree with the 
> install_name they will have in the install tree.  That way when the 
> python modules link they will get the proper paths.  The cost of this 
> workaround is that you will not be able to run anything from the build 
> tree.

The latter is not a problem for me, because I am building a Fink 
package. For the record, here is the list of the relevant variables that 
make things work together with your patch:

        -DVTK_INSTALL_LIB_DIR:STRING="/lib/vtk" \
        -DCMAKE_INSTALL_PREFIX:PATH=%p \
        -DBUILD_SHARED_LIBS:BOOL=ON \
        -DCMAKE_INSTALL_NAME_DIR:STRING=%p/lib/vtk \
        -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=ON \
        -DVTK_USE_RPATH=ON \
        -DVTK_PYTHON_SETUP_ARGS:STRING="--prefix=%p --root=%d"

Here %p=/sw, the general Fink prefix, and %d is the package install root 
that is also used in the install command "make install DESTDIR=%d".

Thanks again for your help.

-- 
Martin




More information about the vtkusers mailing list