Skip to content

Commit

Permalink
Add mingw64 cross compilation toolchain on Linux.
Browse files Browse the repository at this point in the history
  • Loading branch information
neXyon committed Mar 10, 2021
1 parent a7bfa58 commit 67b5013
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions cmake/LinuxMingw64Toolchain.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
SET(CMAKE_SYSTEM_NAME Windows)

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)

SET(CMAKE_FIND_ROOT_PATH /usr/x86_64-w64-mingw32 /usr/lib/gcc/x86_64-w64-mingw32)

set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM BOTH)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY BOTH)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE BOTH)

0 comments on commit 67b5013

Please sign in to comment.