-
-
Notifications
You must be signed in to change notification settings - Fork 174
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: Update MinGW + MSYS2 documentation and setup (#239)
- Loading branch information
Showing
5 changed files
with
61 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
mingw64/mingw-w64-x86_64-uasm | ||
mingw64/mingw-w64-x86_64-clang | ||
mingw64/mingw-w64-x86_64-lld | ||
mingw64/mingw-w64-x86_64-ninja | ||
mingw64/mingw-w64-x86_64-cmake |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
if(NOT DEFINED MINGW_ROOT) | ||
if(DEFINED ENV{MINGW_ROOT}) | ||
SET(MINGW_ROOT $ENV{MINGW_ROOT}) | ||
elseif(DEFINED ENV{MINGW64_ROOT}) | ||
SET(MINGW_ROOT $ENV{MINGW64_ROOT}) | ||
elseif(DEFINED ENV{MINGW32_ROOT}) | ||
SET(MINGW_ROOT $ENV{MINGW32_ROOT}) | ||
else() | ||
message(FATAL_ERROR "Required variable MINGW_ROOT is not defined. Please check README.md for more details !") | ||
endif() | ||
endif() | ||
|
||
# search for programs in the build host directories | ||
set (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY) | ||
|
||
# for libraries and headers in the target directories | ||
set (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) | ||
set (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) | ||
set (CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) | ||
|
||
list(APPEND CMAKE_PREFIX_PATH | ||
${MINGW_ROOT} | ||
) | ||
|
||
SET (CMAKE_ASM_MASM_COMPILER "uasm") | ||
SET (CMAKE_C_COMPILER "clang") | ||
SET (CMAKE_CXX_COMPILER "clang++") | ||
|
||
SET (CMAKE_C_FLAGS "-fuse-ld=lld") | ||
SET (CMAKE_CXX_FLAGS ${CMAKE_C_FLAGS}) | ||
|
||
SET (CMAKE_C_FLAGS_DEBUG "-O0 -g") | ||
SET (CMAKE_CXX_FLAGS_DEBUG ${CMAKE_C_FLAGS_DEBUG}) |