comparison qt-cross-build.txt @ 307:093f92344443

Update cross-building instructions a bit.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 15 May 2023 14:50:10 +0300
parents 00a6cbdd3281
children abebda3ec9cd
comparison
equal deleted inserted replaced
306:4846c53191f8 307:093f92344443
1 # In Debian 9+ 1 # In Debian 9+
2 apt-get install mingw-w64 2 apt-get install mingw-w64 libz-mingw-w64-dev
3 3
4 4
5 # Clone Qt5 base git repo: 5 # Clone Qt6 base git repo:
6 git clone https://code.qt.io/qt/qt5.git qt5-src 6 git clone https://code.qt.io/qt/qt5.git qt6-src
7 cd qt5-src/ 7 cd qt6-src/
8 8
9 # Checkout desired version 9 # Checkout desired version
10 git checkout 5.12 10 git checkout v6.4.3
11 11
12 # Initialize subrepos, we need just qtbase 12 # Initialize subrepos, we need just qtbase
13 ./init-repository -f --module-subset=qtbase 13 ./init-repository -f --module-subset=qtbase
14 git checkout v5.12.6
15 git submodule update
16 14
17 # Configure for cross-compilation 15 # Create build directory
18 ./configure -release -opensource -nomake examples -nomake tests -xplatform win32-g++ -device-option CROSS_COMPILE=i686-w64-mingw32- -opengl desktop 16 cd .. && mkdir qt6-build && cd qt6-build
19 17
20 # Qt5 requires this Windows 10 -specific header file 18 cmake -GNinja -DCMAKE_BUILD_TYPE=Release \
21 wget https://raw.githubusercontent.com/tpn/winsdk-10/master/Include/10.0.10240.0/um/UIViewSettingsInterop.h 19 -DQT_FEATURE_vulkan=OFF \
22 -O /usr/i686-w64-mingw32/include/ 20 -DQT_NO_PACKAGE_VERSION_CHECK=TRUE \
21 -DCMAKE_TOOLCHAIN_FILE=/path/to/debian-i686-w64-mingw32.cmake \
22 ../qt6-src/
23 23
24 # Build it 24 # Whether you need to disable Vulkan or version check depend on .. things.
25 make -j8 25 # Generally the Qt version on the "host" e.g. Linux should match the
26 # version you are cross-building, so 6.4.3 on both. In my case I have
27 # 6.4.2 on Debian host and this works.
28
29 cmake --build . --parallel