mirror of
https://github.com/thunderbrewhq/system.git
synced 2026-02-03 16:39:07 +00:00
feat(cmake): add MinGW 64-bit cross compilation toolchain
This commit is contained in:
parent
3be6c8b2c6
commit
53eefc969f
1 changed files with 16 additions and 0 deletions
16
cmake/toolchain/mingw-w64-x86_64.cmake
Normal file
16
cmake/toolchain/mingw-w64-x86_64.cmake
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
set(CMAKE_SYSTEM_NAME Windows)
|
||||
set(CMAKE_SYSTEM_VERSION 6.2)
|
||||
set(TOOLCHAIN_PREFIX x86_64-w64-mingw32)
|
||||
|
||||
# cross compilers to use for C, C++ and Fortran
|
||||
set(CMAKE_C_COMPILER ${TOOLCHAIN_PREFIX}-gcc)
|
||||
set(CMAKE_CXX_COMPILER ${TOOLCHAIN_PREFIX}-g++)
|
||||
set(CMAKE_RC_COMPILER ${TOOLCHAIN_PREFIX}-windres)
|
||||
|
||||
# target environment on the build host system
|
||||
set(CMAKE_FIND_ROOT_PATH /usr/${TOOLCHAIN_PREFIX})
|
||||
|
||||
# modify default behavior of FIND_XXX() commands
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||
Loading…
Add table
Add a link
Reference in a new issue