changeset 307:093f92344443

Update cross-building instructions a bit.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 15 May 2023 14:50:10 +0300
parents 4846c53191f8
children abebda3ec9cd
files qt-cross-build.txt
diffstat 1 files changed, 18 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/qt-cross-build.txt	Mon May 15 14:49:57 2023 +0300
+++ b/qt-cross-build.txt	Mon May 15 14:50:10 2023 +0300
@@ -1,25 +1,29 @@
 # In Debian 9+
-apt-get install mingw-w64
+apt-get install mingw-w64 libz-mingw-w64-dev
 
 
-# Clone Qt5 base git repo:
-git clone https://code.qt.io/qt/qt5.git qt5-src
-cd qt5-src/
+# Clone Qt6 base git repo:
+git clone https://code.qt.io/qt/qt5.git qt6-src
+cd qt6-src/
 
 # Checkout desired version
-git checkout 5.12
+git checkout v6.4.3
 
 # Initialize subrepos, we need just qtbase
 ./init-repository -f --module-subset=qtbase
-git checkout v5.12.6
-git submodule update
 
-# Configure for cross-compilation
-./configure -release -opensource -nomake examples -nomake tests -xplatform win32-g++ -device-option CROSS_COMPILE=i686-w64-mingw32- -opengl desktop
+# Create build directory
+cd .. && mkdir qt6-build && cd qt6-build
 
-# Qt5 requires this Windows 10 -specific header file
-wget https://raw.githubusercontent.com/tpn/winsdk-10/master/Include/10.0.10240.0/um/UIViewSettingsInterop.h
-	-O /usr/i686-w64-mingw32/include/
+cmake -GNinja -DCMAKE_BUILD_TYPE=Release \
+	-DQT_FEATURE_vulkan=OFF \
+	-DQT_NO_PACKAGE_VERSION_CHECK=TRUE \
+	-DCMAKE_TOOLCHAIN_FILE=/path/to/debian-i686-w64-mingw32.cmake \
+	../qt6-src/
 
-# Build it
-make -j8
+# Whether you need to disable Vulkan or version check depend on .. things.
+# Generally the Qt version on the "host" e.g. Linux should match the
+# version you are cross-building, so 6.4.3 on both. In my case I have
+# 6.4.2 on Debian host and this works.
+
+cmake --build . --parallel