2012-04-17 10:15:39 +00:00
|
|
|
isEmpty(MAKEFILE_GENERATOR):error("Qmake spec does not set MAKEFILE_GENERATOR.")
|
|
|
|
isEmpty(QMAKE_PLATFORM) {
|
|
|
|
isEmpty(TARGET_PLATFORM) {
|
|
|
|
equals(MAKEFILE_GENERATOR, UNIX) {
|
|
|
|
equals(QMAKE_HOST.os, Darwin): \
|
|
|
|
TARGET_PLATFORM = macx
|
|
|
|
else: \
|
|
|
|
TARGET_PLATFORM = unix
|
|
|
|
} else:if(equals(MAKEFILE_GENERATOR, MSVC.NET) \
|
|
|
|
|equals(MAKEFILE_GENERATOR, BMAKE) \
|
|
|
|
|equals(MAKEFILE_GENERATOR, MSBUILD) \
|
|
|
|
|equals(MAKEFILE_GENERATOR, MINGW)) {
|
|
|
|
TARGET_PLATFORM = win32
|
|
|
|
} else:if(equals(MAKEFILE_GENERATOR, PROJECTBUILDER) \
|
|
|
|
|equals(MAKEFILE_GENERATOR, XCODE)) {
|
|
|
|
} else:equals(MAKEFILE_GENERATOR, GBUILD) {
|
|
|
|
TARGET_PLATFORM = unix
|
|
|
|
} else {
|
|
|
|
error("Qmake spec sets an invalid MAKEFILE_GENERATOR.")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
equals(TARGET_PLATFORM, unix): \
|
|
|
|
QMAKE_PLATFORM = unix
|
|
|
|
else:equals(TARGET_PLATFORM, macx): \
|
|
|
|
QMAKE_PLATFORM = mac macx unix
|
|
|
|
else:equals(TARGET_PLATFORM, win32): \
|
|
|
|
QMAKE_PLATFORM = win32
|
|
|
|
else: \
|
|
|
|
error("Qmake spec sets an invalid TARGET_PLATFORM.")
|
|
|
|
}
|
|
|
|
CONFIG += $$QMAKE_PLATFORM
|
2012-09-13 20:17:33 +00:00
|
|
|
|
|
|
|
isEmpty(QMAKE_COMPILER) {
|
|
|
|
*-g++*: \
|
|
|
|
QMAKE_COMPILER = gcc
|
|
|
|
else:*-llvm*: \
|
|
|
|
QMAKE_COMPILER = gcc llvm
|
|
|
|
else:*-clang*: \
|
|
|
|
QMAKE_COMPILER = clang llvm
|
|
|
|
else:*-msvc*: \
|
|
|
|
QMAKE_COMPILER = msvc
|
|
|
|
else: \
|
|
|
|
error("qmake spec does not announce the compiler family, and it cannot be guessed.")
|
2012-10-11 13:16:48 +00:00
|
|
|
warning("qmake spec does not announce the compiler family. Guessed $${QMAKE_COMPILER}.")
|
2012-09-13 20:17:33 +00:00
|
|
|
}
|
|
|
|
CONFIG += $$QMAKE_COMPILER
|