gnucash master: Detect and flag MinGW64

John Ralls jralls at code.gnucash.org
Sat Jul 22 16:29:35 EDT 2017


Updated	 via  https://github.com/Gnucash/gnucash/commit/18ef968f (commit)
	from  https://github.com/Gnucash/gnucash/commit/cb5e311a (commit)



commit 18ef968ff1284a1e9512fa1e32a84c7290f55fde
Author: John Ralls <jralls at ceridwen.us>
Date:   Sat Jul 22 13:28:01 2017 -0700

    Detect and flag MinGW64
    
    Got lost in the rebase and merge somehow.

diff --git a/CMakeLists.txt b/CMakeLists.txt
index dbde24b..e601cf0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -95,7 +95,15 @@ SET(BINDIR_BUILD     ${CMAKE_BINARY_DIR}/bin)
 
 SET(SHELL_FROM_ENV $ENV{SHELL})
 SET(SHELL /bin/bash)
-IF (WIN32)
+#We need to distinguish between MinGW.org and MinGW-w64:
+
+IF (MINGW)
+  STRING(FIND ${CMAKE_C_COMPILER} "msys2" IS_MSYS2)
+  IF(${IS_MSYS2} GREATER_EQUAL 0)
+    SET(MINGW64 ON)
+  ENDIF()
+ENDIF(MINGW)
+IF (MINGW AND NOT MINGW64) # /bin/bash will work fine on MinGW
   SET(SHELL ${CMAKE_PREFIX_PATH}/mingw/msys/1.0/bin/bash.exe)
 ENDIF()
 IF (SHELL_FROM_ENV) # Replacing this with IF ($ENV{SHELL}) doesn't work.



Summary of changes:
 CMakeLists.txt | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)



More information about the gnucash-changes mailing list