summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortech4me <guiwanglong@gmail.com>2018-09-05 19:09:14 +0200
committertech4me <guiwanglong@gmail.com>2018-09-19 20:22:14 +0200
commit189cf0da7b5d1f3905558956be64f7292e753000 (patch)
treefb2b5230f29c8c83a736f6872187d0b22c537503
parenttravis: running mingw build on travis ci (diff)
downloadyuzu-189cf0da7b5d1f3905558956be64f7292e753000.tar
yuzu-189cf0da7b5d1f3905558956be64f7292e753000.tar.gz
yuzu-189cf0da7b5d1f3905558956be64f7292e753000.tar.bz2
yuzu-189cf0da7b5d1f3905558956be64f7292e753000.tar.lz
yuzu-189cf0da7b5d1f3905558956be64f7292e753000.tar.xz
yuzu-189cf0da7b5d1f3905558956be64f7292e753000.tar.zst
yuzu-189cf0da7b5d1f3905558956be64f7292e753000.zip
-rw-r--r--CMakeModules/MinGWCross.cmake80
1 files changed, 40 insertions, 40 deletions
diff --git a/CMakeModules/MinGWCross.cmake b/CMakeModules/MinGWCross.cmake
index 25750f521..29ecd1ac4 100644
--- a/CMakeModules/MinGWCross.cmake
+++ b/CMakeModules/MinGWCross.cmake
@@ -1,54 +1,54 @@
-SET(MINGW_PREFIX /usr/x86_64-w64-mingw32/)
-SET(CMAKE_SYSTEM_NAME Windows)
-SET(CMAKE_SYSTEM_PROCESSOR x86_64)
+set(MINGW_PREFIX /usr/x86_64-w64-mingw32/)
+set(CMAKE_SYSTEM_NAME Windows)
+set(CMAKE_SYSTEM_PROCESSOR x86_64)
# Actually a hack, w/o this will cause some strange errors
-SET(CMAKE_HOST_WIN32 TRUE)
+set(CMAKE_HOST_WIN32 TRUE)
-SET(CMAKE_FIND_ROOT_PATH ${MINGW_PREFIX})
-SET(SDL2_PATH ${MINGW_PREFIX})
-SET(MINGW_TOOL_PREFIX ${CMAKE_SYSTEM_PROCESSOR}-w64-mingw32-)
+set(CMAKE_FIND_ROOT_PATH ${MINGW_PREFIX})
+set(SDL2_PATH ${MINGW_PREFIX})
+set(MINGW_TOOL_PREFIX ${CMAKE_SYSTEM_PROCESSOR}-w64-mingw32-)
# Specify the cross compiler
-SET(CMAKE_C_COMPILER ${MINGW_TOOL_PREFIX}gcc-posix)
-SET(CMAKE_CXX_COMPILER ${MINGW_TOOL_PREFIX}g++-posix)
-SET(CMAKE_RC_COMPILER ${MINGW_TOOL_PREFIX}windres)
+set(CMAKE_C_COMPILER ${MINGW_TOOL_PREFIX}gcc-posix)
+set(CMAKE_CXX_COMPILER ${MINGW_TOOL_PREFIX}g++-posix)
+set(CMAKE_RC_COMPILER ${MINGW_TOOL_PREFIX}windres)
# Mingw tools
-SET(STRIP ${MINGW_TOOL_PREFIX}strip)
-SET(WINDRES ${MINGW_TOOL_PREFIX}windres)
-SET(ENV{PKG_CONFIG} ${MINGW_TOOL_PREFIX}pkg-config)
+set(STRIP ${MINGW_TOOL_PREFIX}strip)
+set(WINDRES ${MINGW_TOOL_PREFIX}windres)
+set(ENV{PKG_CONFIG} ${MINGW_TOOL_PREFIX}pkg-config)
# ccache wrapper
-OPTION(USE_CCACHE "Use ccache for compilation" OFF)
-IF(USE_CCACHE)
- FIND_PROGRAM(CCACHE ccache)
- IF (CCACHE)
- MESSAGE(STATUS "Using ccache found in PATH")
- SET_PROPERTY(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ${CCACHE})
- SET_PROPERTY(GLOBAL PROPERTY RULE_LAUNCH_LINK ${CCACHE})
- ELSE(CCACHE)
- MESSAGE(WARNING "USE_CCACHE enabled, but no ccache found")
- ENDIF(CCACHE)
-ENDIF(USE_CCACHE)
+option(USE_CCACHE "Use ccache for compilation" OFF)
+if(USE_CCACHE)
+ find_program(CCACHE ccache)
+ if(CCACHE)
+ message(STATUS "Using ccache found in PATH")
+ set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ${CCACHE})
+ set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ${CCACHE})
+ else(CCACHE)
+ message(WARNING "USE_CCACHE enabled, but no ccache found")
+ endif(CCACHE)
+endif(USE_CCACHE)
# Search for programs in the build host directories
-SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
+set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
# Echo modified cmake vars to screen for debugging purposes
-IF(NOT DEFINED ENV{MINGW_DEBUG_INFO})
- MESSAGE("")
- MESSAGE("Custom cmake vars: (blank = system default)")
- MESSAGE("-----------------------------------------")
- MESSAGE("* CMAKE_C_COMPILER : ${CMAKE_C_COMPILER}")
- MESSAGE("* CMAKE_CXX_COMPILER : ${CMAKE_CXX_COMPILER}")
- MESSAGE("* CMAKE_RC_COMPILER : ${CMAKE_RC_COMPILER}")
- MESSAGE("* WINDRES : ${WINDRES}")
- MESSAGE("* ENV{PKG_CONFIG} : $ENV{PKG_CONFIG}")
- MESSAGE("* STRIP : ${STRIP}")
- MESSAGE("* USE_CCACHE : ${USE_CCACHE}")
- MESSAGE("")
- # So that the debug info only appears once
- SET(ENV{MINGW_DEBUG_INFO} SHOWN)
-ENDIF()
+if(NOT DEFINED ENV{MINGW_DEBUG_INFO})
+ message("")
+ message("Custom cmake vars: (blank = system default)")
+ message("-----------------------------------------")
+ message("* CMAKE_C_COMPILER : ${CMAKE_C_COMPILER}")
+ message("* CMAKE_CXX_COMPILER : ${CMAKE_CXX_COMPILER}")
+ message("* CMAKE_RC_COMPILER : ${CMAKE_RC_COMPILER}")
+ message("* WINDRES : ${WINDRES}")
+ message("* ENV{PKG_CONFIG} : $ENV{PKG_CONFIG}")
+ message("* STRIP : ${STRIP}")
+ message("* USE_CCACHE : ${USE_CCACHE}")
+ message("")
+ # So that the debug info only appears once
+ set(ENV{MINGW_DEBUG_INFO} SHOWN)
+endif()