summaryrefslogtreecommitdiff
path: root/toolchain.cmake.in
blob: ae4bb870d5a4d598e13b79f9b182cd8ddcf220cf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
set(MINGW_TOOLCHAIN @MINGW_TOOLCHAIN@)

set(CMAKE_SYSTEM_NAME Windows)
set(CMAKE_CROSSCOMPILING ON)

set(CMAKE_AR "${MINGW_TOOLCHAIN}-ar")
set(CMAKE_C_COMPILER "${MINGW_TOOLCHAIN}-gcc")
set(CMAKE_CXX_COMPILER "${MINGW_TOOLCHAIN}-g++")
set(CMAKE_RC_COMPILER "${MINGW_TOOLCHAIN}-windres")
set(CMAKE_OBJCOPY "${MINGW_TOOLCHAIN}-objcopy")
set(CMAKE_OBJDUMP "${MINGW_TOOLCHAIN}-objdump")
set(CMAKE_READELF "${MINGW_TOOLCHAIN}-readelf")

set(CMAKE_FIND_ROOT_PATH "/usr/${MINGW_TOOLCHAIN}")
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)

find_program(WINE wine)
if(WINE)
	set(CMAKE_CROSSCOMPILING_EMULATOR ${WINE})
endif()