fix? build-windows

This commit is contained in:
Agel committed 2026-05-24 08:41:21 +02:00
1 parent fd751d6111
commit bb18197228
6 files changed
+58 -30

No files matched your search

+4 -4
View File
@@ -5,10 +5,10 @@ set(CMAKE_C_COMPILER x86_64-w64-mingw32-gcc)
set(CMAKE_CXX_COMPILER x86_64-w64-mingw32-g++)
set(CMAKE_RC_COMPILER x86_64-w64-mingw32-windres)
# Default sysroot for cross-compiled deps; overridden per-project via -DCMAKE_FIND_ROOT_PATH.
# Must be non-empty for ONLY mode to work — without it CMake silently falls back to host paths
# (e.g. /usr/include), which causes the MinGW compiler to pull in Linux glibc headers.
set(CMAKE_FIND_ROOT_PATH /opt/mingw-sysroot /usr/x86_64-w64-mingw32)
# Append default sysroot paths. list(APPEND) preserves any paths already set via
# -DCMAKE_FIND_ROOT_PATH on the cmake command line (e.g. the Qt Windows install dir),
# while plain set() would silently override them and break find_package(Qt6).
list(APPEND CMAKE_FIND_ROOT_PATH /opt/mingw-sysroot /usr/x86_64-w64-mingw32)
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)