Reputation: 1602
Building a framework on Mac OSX is straightforward using XCode with its ready-made templates. I'm wondering whether there's a simple way to do the same thing ie. define the output of a Qt Creator build to be a framework by using the .pro file.
At the moment, I'm stuck building my libraries, then manually constructing the directory structure for a framework with the libs, headers and ./Current and ./Version directories.
Thanks guys
Upvotes: 1
Views: 1273
Reputation: 51832
Yes. The functionality is offered by qmake. In your .pro
file, you need:
TEMPLATE = lib
CONFIG += lib_bundle
This is documented here: https://doc.qt.io/qt-5/qmake-platform-notes.html#creating-frameworks
If you want the framework to be used for development, make sure the correct headers are copied to the bundle. QMAKE_BUNDLE_DATA
is used for this.
Upvotes: 4