[CMake] Creating a Mac bundle for an app dependent on Qt and ParaView
Ben Medina
ben.medina at gmail.com
Thu Apr 22 16:38:51 EDT 2010
FYI, this turned out to be user error. I somehow was starting with a
bundle that had been partially repaired, and fixup_bundle choked on
that. After I cleaned and rebuilt, fixup_bundle worked as expected.
Now if only it would copy qt_menu.nib....
Thanks,
Ben
On Wed, Apr 21, 2010 at 10:43 AM, Ben Medina <ben.medina at gmail.com> wrote:
> Hello all,
>
> I am trying to package an app on the Mac into an app bundle. This app
> depends on Qt and ParaView, so I have code like this:
>
> # directories to look for dependencies: Qt, ParaView/VTK
> set(DIRS "${QT_LIBRARY_DIRS};${PARAVIEW_LIBRARY_DIRS}")
>
> install(CODE
> "
> include(BundleUtilities)
> fixup_bundle(\"${TP_MAC_BUNDLE_PATH}\" \"\" \"${DIRS}\")
> "
> COMPONENT Runtime
> )
>
> However, I get errors about finding the ParaView libs during
> packaging. For each ParaView lib:
>
> warning: target
> '@executable_path/../MacOS/libvtkPVServerManager.dylib' is not
> absolute...
> warning: target
> '@executable_path/../MacOS/libvtkPVServerManager.dylib' does not
> exist...
> /usr/bin/otool: can't open file:
> @executable_path/../MacOS/libvtkPVServerManager.dylib (No such file or
> directory)
>
> Followed by:
>
> Error copying file
> "@executable_path/../MacOS/libvtkPVServerManager.dylib" to
> ".../MyApp.app/Contents/MacOS/libvtkPVServerManager.dylib".
>
> Obviously, it's not looking in the right place for the libs. I'm
> expecting it to look in PARAVIEW_LIBRARY_DIRS, as I specified in the
> last argument to fixup_bundle (and, indeed, PARAVIEW_LIBRARY_DIRS does
> get set to a directory containing the specified libs). But it's
> looking in the bundle itself. What am I doing wrong?
>
> Thanks,
> Ben
>
More information about the CMake
mailing list