From 630a852669118b8dab86ee9a311caf770e878124 Mon Sep 17 00:00:00 2001 From: Roy Jacobs Date: Sat, 4 Mar 2017 12:17:51 +0100 Subject: [PATCH] Fixes reliable building in both mingw32 shell as Qt creator. Cleans redundant path naming. --- monero-wallet-gui.pro | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/monero-wallet-gui.pro b/monero-wallet-gui.pro index 275faa65..8c22d052 100644 --- a/monero-wallet-gui.pro +++ b/monero-wallet-gui.pro @@ -144,25 +144,29 @@ CONFIG(WITH_SCANNER) { win32 { + # QMAKE_HOST.arch is unreliable, will allways report 32bit if mingw32 shell is run. + # Obtaining arch through uname should be reliable. This also fixes building the project in Qt creator without changes. + MSYS_HOST_ARCH = $$system(uname -a | grep -o "x86_64") + + # Even if host is 64bit, we are building win32 spec, so mingw path should allways be "/mingw32" + MSYS_MINGW_PATH=/mingw32 + BOOST_MINGW_PATH=$$MSYS_MINGW_PATH/boost + # Win64 Host settings - contains(QMAKE_HOST.arch, x86_64) { + contains(MSYS_HOST_ARCH, x86_64) { message("Host is 64bit") - MSYS_PATH=c:/msys64/mingw64 - MSYS_MINGW_PATH=/mingw64 + MSYS_PATH=c:/msys64/mingw32 # boost root path - BOOST_PATH=c:/msys64/mingw64/boost - BOOST_MINGW_PATH=/mingw64/boost + BOOST_PATH=$$MSYS_PATH/boost # WIN32 Host settings } else { message("Host is 32bit") MSYS_PATH=c:/msys32/mingw32 - MSYS_MING_PATH=/mingw32 # boost root path - BOOST_PATH=c:/msys32/mingw32/boost - BOOST_MINGW_PATH=/mingw32/boost + BOOST_PATH=$$MSYS_PATH/boost }