# HG changeset patch # User Matti Hamalainen # Date 1684151410 -10800 # Node ID 093f923444435647896a59277a32f86c0305dcbd # Parent 4846c53191f805276a1525bde9433dbafa5f78c9 Update cross-building instructions a bit. diff -r 4846c53191f8 -r 093f92344443 qt-cross-build.txt --- 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