[CMake] [CMAKE] fixup_bundle problem with qt plugins
Clinton Stimpson
clinton at elemtech.com
Wed Apr 28 14:23:00 EDT 2010
On Wednesday 28 April 2010 04:29:29 am Martin Guillon wrote:
> Hi,
>
> I am having problems using fixup_bundle with qt plugins
>
> I use that code
> install(CODE "
> # glob for previously installed qt plugins to include in fixup_bundle
> file(GLOB_RECURSE QTPLUGINS
>
> \"${${TARGET_NAME}_OUTPUTPLUGINSDIR}/*${CMAKE_SHARED_LIBRARY_SUFFIX}\")
> include(BundleUtilities)
> fixup_bundle(\"${APPS}\" \"\${QTPLUGINS}\" \"${DIRS}\")"
> )
> where \"${${TARGET_NAME}_OUTPUTPLUGINSDIR} points to
> myapp.app/Contents/Plugins
>
> so inside it I have that myapp.app/Contents/Plugins/imageformats/ ...
>
> The fixup_bundle scripts corrects those files correctly but my big problem
> is that it copies the corrected files in that myapp.app/Contents/MacOS
>
> My first question is why???
>
> And the most important question is can I make it so that It corrects the
> dylibs but does not move them? The problem with copying files is that now
> imageformats dylibs are directly in MacOS and so no way to make qt load
> them at startup.
BundleUtilities doesn't handle applications with Qt plugins correctly.
http://public.kitware.com/Bug/view.php?id=9744
There's a patch there if you want to apply it locally. But it appears there
is still the issue of how BundleUtilities is supposed to deal with plugins.
Personally, I'm fine with doing my own install(DIRECTORY ...) command for Qt
plugins and letting BundleUtilities work off of that.
Clint
More information about the CMake
mailing list