Skip to content

Commit 3a29ba3

Browse files
committed
Merge bitcoin#32357: depends: Fix cross-compiling qt package from macOS to Windows
35e57fb depends: Fix cross-compiling `qt` package from macOS to Windows (Hennadii Stepanov) Pull request description: Native packages cannot be used during cross-compiling. However, Qt still unconditionally tries to find them, which causes issues in some cases, such as when [cross-compiling from macOS to Windows](bitcoin#32346). This PR explicitly disables this unnecessary Qt behaviour. Fixes bitcoin#32346. Here is a full workflow on my macOS Sequoia 15.4.1 (Intel): ``` % brew install make cmake ninja mingw-w64 nsis % gmake -C depends -j 10 HOST=x86_64-w64-mingw32 % cmake -B build --toolchain depends/x86_64-w64-mingw32/toolchain.cmake % cmake --build build -j 10 -t deploy ``` ACKs for top commit: shahsb: ACK bitcoin@35e57fb fanquake: ACK 35e57fb Tree-SHA512: 2822fb49bc84dd094dbd189d8a9ca0f023e1e48127db7beaefb9db92de53df63bb0f399c9c430c33941f9a9ee6976b9161d80467d889f7717385b9d1ea9fee43
2 parents f409444 + 35e57fb commit 3a29ba3

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

depends/packages/qt.mk

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,14 @@ ifneq ($(host),$(build))
190190
$(package)_cmake_opts += -DCMAKE_SYSTEM_NAME=$($(host_os)_cmake_system_name)
191191
$(package)_cmake_opts += -DCMAKE_SYSTEM_VERSION=$($(host_os)_cmake_system_version)
192192
$(package)_cmake_opts += -DCMAKE_SYSTEM_PROCESSOR=$(host_arch)
193+
# Native packages cannot be used during cross-compiling. However,
194+
# Qt still unconditionally tries to find them, which causes issues
195+
# in some cases, such as when cross-compiling from macOS to Windows.
196+
# Explicitly disable this unnecessary Qt behaviour.
197+
$(package)_cmake_opts += -DCMAKE_DISABLE_FIND_PACKAGE_Libb2=TRUE
198+
$(package)_cmake_opts += -DCMAKE_DISABLE_FIND_PACKAGE_WrapSystemDoubleConversion=TRUE
199+
$(package)_cmake_opts += -DCMAKE_DISABLE_FIND_PACKAGE_WrapSystemMd4c=TRUE
200+
$(package)_cmake_opts += -DCMAKE_DISABLE_FIND_PACKAGE_WrapZSTD=TRUE
193201
endif
194202
ifeq ($(host_os),darwin)
195203
$(package)_cmake_opts += -DCMAKE_INSTALL_NAME_TOOL=true

0 commit comments

Comments
 (0)