[Paraview] @executable_path when deploying custom plugins for OSX
Peter Schmitt
pschmittml at gmail.com
Tue Feb 7 14:23:39 EST 2012
Hi David,
Thanks for the hints. My goal is to create a plugin that my collaborators
can load using the Kitware release of the ParaView binaries. I don't care
if my plugin is installed in the SuperBuild's ParaView.app.
In any case, I tried adding this to my plugin's CMakeLists.txt file:
SET(PARAVIEW_VERSION "${PARAVIEW_VERSION_MAJOR}.${PARAVIEW_VERSION_MINOR}")
SET(PV_INSTALL_BIN_DIR bin)
SET(PV_INSTALL_LIB_DIR lib/paraview-${PARAVIEW_VERSION})
INSTALL(TARGETS vtkLFMReader
RUNTIME DESTINATION ${PV_INSTALL_BIN_DIR} COMPONENT RuntimeLibraries
LIBRARY DESTINATION ${PV_INSTALL_LIB_DIR} COMPONENT RuntimeLibraries
ARCHIVE DESTINATION ${PV_INSTALL_LIB_DIR} COMPONENT Development)
Now `make install` copies my file to /usr/local/paraview-3.12. However,
otool still shows hard-coded paths (ie. not @executable_path).
I'll look into BundleUtilities to see if I can explicitly call
fixup_bundle_item to set the @executable_path for my plugin. I suppose the
easiest method might be just to copy my plugin to the ParaView source tree
& let the ParaView `make install` target handle setting all of
fixup_bundle's arguments for me. That seemed to work with an old version
of ParaView
http://www.paraview.org/pipermail/paraview/2008-November/009952.html
Thanks,
Pete
On Mon, Feb 6, 2012 at 5:26 PM, David E DeMarle <dave.demarle at kitware.com>wrote:
> fixup_bundle is a cmake 2.8 feature that internally just runs
> install_name_tool on Mac like you are considering doing manually.
> I believe it is only tied the install target but I might be wrong on
> that, ask on the cmake list.
>
> See the ParaViewPlugins.cmake and Superbuild/CMakeLists.txt for how
> our plugins get the install target hooked in.
>
> David E DeMarle
> Kitware, Inc.
> R&D Engineer
> 21 Corporate Drive
> Clifton Park, NY 12065-8662
> Phone: 518-881-4909
>
>
>
> On Mon, Feb 6, 2012 at 7:06 PM, Peter Schmitt <pschmittml at gmail.com>
> wrote:
> > Hello,
> >
> > I have built ParaView-3.12.0 from the SuperBuild. Using otool, I noticed
> > that libraries had a hard-coded path to each shared library in the build
> > directory (otool -L ParaView-build/bin/libvtkPVServerManager.dylib).
> > However, after `make install`, I noticed each library was prefixed with
> > @executable_path (otool -L /usr/local/ParaView\
> > 3.12.0.app/Contents/Libraries/libvtkPVServerManager.dylib). I would
> like to
> > apply the same transformation to any custom plugins I have compiled.
> > However, my plugin doesn't have a 'make install' target. It looks like
> I
> > can manually update my plugin dylib via calls to
> >
> > install_name_tool -change /full/path/to/libfoo.dylib
> > @executable_path/../Libraries/libfoo.dylib libBar.dylib
> >
> > but there has to be a better way. The `make install` target from
> SuperBuild
> > suggests that the "fixup_bundle" updates the libraries appropriately.
> How
> > do I apply the same transformation for my custom plugin?
> >
> > Thanks!
> > Pete
> >
> > _______________________________________________
> > Powered by www.kitware.com
> >
> > Visit other Kitware open-source projects at
> > http://www.kitware.com/opensource/opensource.html
> >
> > Please keep messages on-topic and check the ParaView Wiki at:
> > http://paraview.org/Wiki/ParaView
> >
> > Follow this link to subscribe/unsubscribe:
> > http://www.paraview.org/mailman/listinfo/paraview
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20120207/cd33e1d1/attachment.htm>
More information about the ParaView
mailing list