Skip to content

Instantly share code, notes, and snippets.

@kitattyor
kitattyor / mingw-w64-x86_64.cmake
Last active November 15, 2020 14:43 — forked from peterspackman/mingw-w64-x86_64.cmake
cmake toolchain file for mingw-w64 x86_64 builds on Fedora Docker/Podman container
# Sample toolchain file for building for Windows from an Fedora container System (base image fedora).
#
# Typical usage:
# *) install cross compiler: `dnf install mingw64-gcc mingw64-gcc-c++`
# *) cd build
# *) cmake -DCMAKE_TOOLCHAIN_FILE=/usr/share/mingw/toolchain-mingw64.cmake ..
# ... best to check the path with a `find . -name "*cmake" | grep mingw
set(CMAKE_SYSTEM_NAME Windows)
set(TOOLCHAIN_PREFIX x86_64-w64-mingw32)