Determine XCode command line tools version:
pkgutil --pkg-info=com.apple.pkg.CLTools_Executables
version: 16.4.0.0.1.1747106510
volume: /
location: /
install-time: 1750710554
clang --version
Apple clang version 17.0.0 (clang-1700.0.13.5)
Target: x86_64-apple-darwin24.5.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
/usr/bin/xcodebuild -version
Xcode 16.4
Build version 16F6
Extract QT from the archive:
export MY_QT_VERSION=6.9.1
cd ~/dev/repos
tar xf ~/Downloads/qt-everywhere-src-${MY_QT_VERSION}.tar.xz
Build QT for MacOS
export MY_QT_VERSION=6.9.1
tar xf ~/Downloads/qt-everywhere-src-${MY_QT_VERSION}.tar.xz
cd ~/dev/build/qt
export MY_QT_SRC_DIR=~/dev/repos/qt-everywhere-src-${MY_QT_VERSION}
export MY_MODE=release
#export MY_MODE=debug
export MY_INSTALL_PATH=~/dev/libs/QT6/${MY_MODE}/MacOs
${MY_QT_SRC_DIR}/configure -prefix $MY_INSTALL_PATH -c++std c++20 -opensource -confirm-license \
-static -static-runtime -${MY_MODE} -force-debug-info \
-no-openssl -securetransport \
-skip qt3d -skip qt5compat -skip qtactiveqt -skip qtcharts -skip qtcoap -skip qtconnectivity \
-skip qtdatavis3d -skip qtdoc -skip qtlottie -skip qtmqtt -skip qtnetworkauth -skip qtopcua \
-skip qtserialport -skip qtpositioning -skip qtquicktimeline -skip qtquick3d -skip qtremoteobjects \
-skip qtscxml -skip qtsensors -skip qtserialbus -skip qtvirtualkeyboard -skip qtwayland \
-skip qtwebchannel -skip qtwebengine -skip qtwebview -skip qtquick3dphysics -skip qtspeech -skip qtlocation \
-skip qthttpserver -skip qtgraphs \
-- -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" \
&& cmake --build . --parallel \
&& cmake --install .
Build QT for iOS
export MY_QT_VERSION=6.9.1
export MY_QT_SRC_DIR=~/dev/repos/qt-everywhere-src-${MY_QT_VERSION}
export MY_MODE=release
#export MY_MODE=debug
cd ~/dev/build/qt
export MY_HOST_PATH=~/dev/libs/QT6/${MY_MODE}/MacOs
export MY_INSTALL_PATH=~/dev/libs/QT6/${MY_MODE}/iOS
${MY_QT_SRC_DIR}/configure -prefix $MY_INSTALL_PATH -qt-host-path $MY_HOST_PATH \
-platform macx-ios-clang -c++std c++20 -opensource -confirm-license \
-static -static-runtime -$MY_MODE -force-debug-info \
-no-openssl -securetransport \
-skip qt3d -skip qt5compat -skip qtactiveqt -skip qtcharts -skip qtcoap -skip qtconnectivity \
-skip qtdatavis3d -skip qtdoc -skip qtlottie -skip qtmqtt -skip qtnetworkauth -skip qtopcua \
-skip qtserialport -skip qtpositioning -skip qtquicktimeline -skip qtquick3d -skip qtremoteobjects \
-skip qtscxml -skip qtsensors -skip qtserialbus -skip qtvirtualkeyboard -skip qtwayland \
-skip qtwebchannel -skip qtwebengine -skip qtwebview -skip qtquick3dphysics -skip qtspeech -skip qtlocation \
-skip qthttpserver -skip qtgraphs \
&& cmake --build . --parallel \
&& cmake --install .