refactored 32/64bit detection in qmake files to avoid duplication

This commit is contained in:
Mathew Sutcliffe
2014-06-17 19:27:06 +01:00
parent 072667b3b4
commit 976de540e8
3 changed files with 59 additions and 76 deletions

View File

@@ -27,46 +27,17 @@ linux:DEFINES += LIN
macx:DEFINES += APL
# X-Plane plugins must follow a prescribed filename and directory structure.
# CPU architecture detection copied from externals.pri;
# TODO: refactor so detection is is done in only one place.
TARGET_EXT = .xpl
win32:TARGET = win
linux:TARGET = lin
macx:TARGET = mac
win32:contains(QMAKE_TARGET.arch, x86_64) {
DESTDIR = ../../xbus/64
}
win32:contains(QMAKE_TARGET.arch, x86) {
DESTDIR = ../../xbus
}
win32-g++ {
WIN_FIND = $$(SYSTEMROOT)\system32\find
MINGW64 = $$system($$QMAKE_CXX -Q --help=target | $$WIN_FIND \"-m64\")
contains(MINGW64,[enabled]) {
DESTDIR = ../../xbus/64
}
else {
DESTDIR = ../../xbus
}
}
linux-g++ {
GCC64 = $$system($$QMAKE_CXX -Q --help=target | grep m64)
contains(GCC64,[enabled]) {
DESTDIR = ../../xbus/64
}
else {
DESTDIR = ../../xbus
}
}
linux-g++-64 {
DESTDIR = ../../xbus/64
}
linux-g++-32 {
DESTDIR = ../../xbus
}
macx {
# a single dylib file contains both 32bit and 64bit binaries
DESTDIR = ../../xbus
}
else {
equals(WORD_SIZE,64): DESTDIR = ../../xbus/64
equals(WORD_SIZE,32): DESTDIR = ../../xbus
}
include (../../libraries.pri)