[cmake-developers] BundleUtilities question

Kinga Kasa kinga.kasa at doclerholding.com
Fri Aug 24 08:24:39 EDT 2018


Hello!

I have a question regarding BundleUtilities.
I need to deploy an application on mac (building the application, then making a bundle from it, then fixing up the dependencies in order for it to be stand-alone).
I need to make a macos app bundle which has the following structure:

-MyApp.app
                -Contents
                                -Frameworks (all dependencies are here)
                                -MacOS
                                                -MyExecutable1
                                                -MyExecutable2
                                -Resources
                                -PlugIns (QT deploy made this folder)

So as this application uses QT, I tried to used macdeployqt, but it just doesn't work with two executables in one bundle (doesn't fixing the dependencies, if I check with otool, some of the libraries and frameworks were not be able to become resolved).
So I decided to use cmakes' BundleUtilities as I am also using cmake build system.
I call the function like this:

include(BundleUtilities)
set(APPS "MyApp.app")
fixup_bundle("${APPS}" "" "")

It fixes up everything good, only the QT related dependencies (and another 3rd party lib). It says:

Error: copying file (when tries to copy the framework to the correct place)
and
"warning: cannot resolve item @rpath/QtNetwork.framework/Versions/5/QtNetwork
warning: gp_resolved_file_type non-absolute file '@rpath/QtNetwork.framework/Versions/5/QtNetwork' returning type 'other' - possibly incorrect"

All the QT related frameworks are in the app bundle already, as I called macdeployqt, so it copied the QT frameworks in the bundles' Frameworks directory.

I could not find any hint on the web, so I hope here I can get some advice on how to proceed.


Thank you in advance!


Kinga
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake-developers/attachments/20180824/57d18bda/attachment.html>


More information about the cmake-developers mailing list