Some checks failed
Build Eden Emulator / build-windows (push) Failing after 8m52s
28 lines
873 B
CMake
28 lines
873 B
CMake
# MinGW-w64 toolchain file for cross-compiling to Windows on Linux
|
|
|
|
set(CMAKE_SYSTEM_NAME Windows)
|
|
set(CMAKE_SYSTEM_PROCESSOR x86_64)
|
|
|
|
# Specify the cross compiler
|
|
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)
|
|
|
|
# Specify the target environment
|
|
set(CMAKE_FIND_ROOT_PATH /usr/x86_64-w64-mingw32)
|
|
|
|
# Search for programs in the build host directories
|
|
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
|
|
|
# Search for libraries and headers in the target directories
|
|
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
|
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
|
|
|
# Set Windows-specific flags
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static-libgcc -static-libstdc++")
|
|
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static")
|
|
|
|
# Ensure we're targeting Windows
|
|
set(WIN32 TRUE)
|
|
set(MINGW TRUE)
|