-
Notifications
You must be signed in to change notification settings - Fork 2
/
cross-compile-i686-w64-mingw32.cmake
26 lines (20 loc) · 998 Bytes
/
cross-compile-i686-w64-mingw32.cmake
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
SET(CMAKE_SYSTEM_NAME Windows)
SET(COMPILER_PREFIX "i686-w64-mingw32")
find_program(CMAKE_RC_COMPILER NAMES ${COMPILER_PREFIX}-windres)
find_program(CMAKE_C_COMPILER NAMES ${COMPILER_PREFIX}-gcc)
find_program(CMAKE_CXX_COMPILER NAMES ${COMPILER_PREFIX}-g++)
find_program(CMAKE_Fortran_COMPILER NAMES ${COMPILER_PREFIX}-gfortran)
find_program(CMAKE_AR NAMES ${COMPILER_PREFIX}-ar)
find_program(CMAKE_NM NAMES ${COMPILER_PREFIX}-nm)
find_program(CMAKE_OBJDUMP NAMES ${COMPILER_PREFIX}-objdump)
find_program(CMAKE_OBJCOPY NAMES ${COMPILER_PREFIX}-objcopy)
find_program(CMAKE_RANLIB NAMES ${COMPILER_PREFIX}-ranlib)
find_program(CMAKE_STRIP NAMES ${COMPILER_PREFIX}-strip)
find_program(CMAKE_LINKER NAMES ${COMPILER_PREFIX}-ld)
SET(CMAKE_CXX_FLAGS "")
SET(CMAKE_C_FLAGS "")
SET(CMAKE_Fortran_FLAGS "")
SET(CMAKE_FIND_ROOT_PATH /usr/${COMPILER_PREFIX})
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)