- Download Qt for Open Source development: https://www.qt.io/download
- Register, if you don't have an account yet.
- Install:
- Use default installation folder:
~/Qt - Select:
- Qt 5.15.2
- Sources
- Qt Virtual Keyboard
- Qt Network Authorization
- Use default installation folder:
- Make sure that XCode and command line tools are installed
- Patch Qt source file
~/Qt/5.15.2/Src/qtbase/src/plugins/platforms/cocoa/qiosurfacegraphicsbuffer.h
Add the following include just before QT_BEGIN_NAMESPACE:
#include <CoreGraphics/CGColorSpace.h>
- Create a shallow build directory (don't compile inside source directory):
mkdir -p ~/projects/qt-static-5.15.2
cd ~/projects/qt-static-5.15.2- Configure
~/Qt/5.15.2/Src/configure --prefix=~/Qt/5.15.2/clang_64-static -static -debug-and-release \
-nomake examples -nomake tests \
-qt-libpng -qt-zlib -qt-libjpeg \
-opensource -confirm-license \
-opengl -qt-freetype -qt-pcre -qt-harfbuzz -platform macx-clang- Make
Adjust4to the available number of cores in your machine:
make -j 4- Install
make -j 4 install- Configure a new Qt Kit in Qt Creator
- Preferences, Kits, Qt Versions: Add...
- Select
~/Qt/5.15.2/clang_64-static/bin/qmake
- Select
- Preferences, Kits: Add
- Name: Desktop Qt 5.15.2 static
- Qt version: previously defined Qt version
Qt 5.15.2 (clang_64-static)
- Preferences, Kits, Qt Versions: Add...
- Change Kit in project, compile, finished!
Contributions welcomed 😊
Contributions welcomed 😊