Files
dynamics/cmake/toolchain-mingw.cmake
2026-05-17 08:47:25 +08:00

18 lines
578 B
CMake
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# cmake/toolchain-mingw.cmake
# 交叉编译 → Windows (x86_64) MinGW
# 需要安装 mingw-w64
# Ubuntu/Debian: apt install mingw-w64
# macOS: brew install mingw-w64
# Fedora: dnf install mingw64-gcc
set(CMAKE_SYSTEM_NAME Windows)
set(CMAKE_SYSTEM_PROCESSOR x86_64)
set(CMAKE_C_COMPILER x86_64-w64-mingw32-gcc)
set(CMAKE_CXX_COMPILER x86_64-w64-mingw32-g++)
set(CMAKE_Fortran_COMPILER x86_64-w64-mingw32-gfortran)
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)