Skip to content

Commit 35e57fb

Browse files
committed
depends: Fix cross-compiling qt package from macOS to Windows
1 parent d2ac748 commit 35e57fb

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)