Fixes reliable building in both mingw32 shell as Qt creator.

Cleans redundant path naming.
This commit is contained in:
Roy Jacobs 2017-03-04 12:17:51 +01:00
parent 2a8419c7cd
commit 630a852669

View file

@ -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
}