macos universal build of Qt sources
-
I'm attempting to make a universal build (dylibs containing both arm and intel) of Qt 6.8.3.
According ot the documentation (https://doc.qt.io/qt-6/macos-building.html) I should pass the option -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" to configure but I still end up with arm64 only dylibs in both my build folder and the install folder. Im doing this from a script:cd $QT_BUILD_DIR /bin/zsh -c "\"$QT_SOURCE_DIR/configure\" $QT_CONFIGURE_OPTIONS -DCMAKE_OSX_ARCHITECTURES=\"x86_64;arm64\"" cmake --build . --parallel || ( echo "Build Failed!"; exit 1 )$QT_BUILD_DIR is the path to my build output folder, $QT_SOURCE_DIR is the absolute path to the folder containing the Qt sources and $QT_CONFIGURE_OPTIONS contains options like -opensource -debug-and-release -no-framework -confirm-license things to skip etc.
Can someone point me in the right direction to get this working? I'm bulding on an apple silicon machine and have ninja installed.
-
G gvanvoor has marked this topic as solved
-
Notice the standalone double dash in the example in the document. It is important, since the option is not for the configuration script itself, it is something that it needs to pass on to the underlying CMake invocations.