-
Notifications
You must be signed in to change notification settings - Fork 64
/
toolchain_mingw.cmake
24 lines (20 loc) · 1.34 KB
/
toolchain_mingw.cmake
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
set(CMAKE_SYSTEM_NAME Windows)
set(CMAKE_C_COMPILER /usr/bin/x86_64-w64-mingw32-gcc-posix)
set(CMAKE_CXX_COMPILER /usr/bin/x86_64-w64-mingw32-g++-posix)
set(CMAKE_AR /usr/bin/x86_64-w64-mingw32-ar CACHE FILEPATH "" FORCE)
set(CMAKE_C_COMPILER_AR /usr/bin/x86_64-w64-mingw32-gcc-ar CACHE FILEPATH "" FORCE)
set(CMAKE_CXX_COMPILER_AR /usr/bin/x86_64-w64-mingw32-gcc-ar CACHE FILEPATH "" FORCE)
set(CMAKE_LINKER /usr/bin/x86_64-w64-mingw32-ld CACHE FILEPATH "" FORCE)
set(CMAKE_NM /usr/bin/x86_64-w64-mingw32-nm CACHE FILEPATH "" FORCE)
set(CMAKE_OBJCOPY /usr/bin/x86_64-w64-mingw32-objcopy CACHE FILEPATH "" FORCE)
set(CMAKE_OBJDUMP /usr/bin/x86_64-w64-mingw32-objdump CACHE FILEPATH "" FORCE)
set(CMAKE_RANLIB /usr/bin/x86_64-w64-mingw32-ranlib CACHE FILEPATH "" FORCE)
set(CMAKE_C_COMPILER_RANLIB /usr/bin/x86_64-w64-mingw32-gcc-ranlib CACHE FILEPATH "" FORCE)
set(CMAKE_CXX_COMPILER_RANLIB /usr/bin/x86_64-w64-mingw32-gcc-ranlib CACHE FILEPATH "" FORCE)
set(CMAKE_STRIP /usr/bin/x86_64-w64-mingw32-strip CACHE FILEPATH "" FORCE)
set(CMAKE_FIND_ROOT_PATH /usr/x86_64-w64-mingw32;${PROJECT_SOURCE_DIR})
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
set(CMAKE_INSTALL_PREFIX ${CMAKE_FIND_ROOT_PATH}/usr CACHE FILEPATH "install path prefix")
set(CMAKE_EXE_LINKER_FLAGS_INIT "-static")