2012-12-11 21:22:23 +00:00
|
|
|
# This file is loaded by qmake right after loading the qmakespec.
|
|
|
|
# Afterwards, the project's .qmake.conf and .qmake.cache are loaded
|
|
|
|
# (if present).
|
|
|
|
# Note that up to this point, nothing specific to a particular SUBDIRS
|
|
|
|
# project or build pass can be done.
|
|
|
|
|
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): \
|
2013-07-09 14:09:38 +00:00
|
|
|
TARGET_PLATFORM = macx # backwards compatibility; cannot change
|
2012-04-17 10:15:39 +00:00
|
|
|
else: \
|
|
|
|
TARGET_PLATFORM = unix
|
|
|
|
} else:if(equals(MAKEFILE_GENERATOR, MSVC.NET) \
|
|
|
|
|equals(MAKEFILE_GENERATOR, MSBUILD) \
|
|
|
|
|equals(MAKEFILE_GENERATOR, MINGW)) {
|
|
|
|
TARGET_PLATFORM = win32
|
|
|
|
} else:if(equals(MAKEFILE_GENERATOR, PROJECTBUILDER) \
|
|
|
|
|equals(MAKEFILE_GENERATOR, XCODE)) {
|
2015-02-06 15:49:30 +00:00
|
|
|
TARGET_PLATFORM = macx
|
2012-04-17 10:15:39 +00:00
|
|
|
} else {
|
|
|
|
error("Qmake spec sets an invalid MAKEFILE_GENERATOR.")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
equals(TARGET_PLATFORM, unix): \
|
|
|
|
QMAKE_PLATFORM = unix
|
|
|
|
else:equals(TARGET_PLATFORM, macx): \
|
2016-06-11 04:13:35 +00:00
|
|
|
QMAKE_PLATFORM = macos osx macx mac darwin unix
|
2012-04-17 10:15:39 +00:00
|
|
|
else:equals(TARGET_PLATFORM, win32): \
|
|
|
|
QMAKE_PLATFORM = win32
|
|
|
|
else: \
|
|
|
|
error("Qmake spec sets an invalid TARGET_PLATFORM.")
|
|
|
|
}
|
2013-07-09 14:09:38 +00:00
|
|
|
|
2016-06-15 22:47:29 +00:00
|
|
|
contains(QMAKE_PLATFORM, macx) {
|
|
|
|
!contains(QMAKE_PLATFORM, osx) {
|
|
|
|
warning("qmake spec specified platform macx, but not osx.");
|
|
|
|
QMAKE_PLATFORM = osx $$QMAKE_PLATFORM
|
|
|
|
}
|
|
|
|
|
|
|
|
!contains(QMAKE_PLATFORM, macos) {
|
|
|
|
warning("qmake spec specifies platform macx, but not macos.")
|
|
|
|
QMAKE_PLATFORM = macos $$QMAKE_PLATFORM
|
|
|
|
}
|
2013-07-09 14:09:38 +00:00
|
|
|
}
|
|
|
|
|
2012-04-17 10:15:39 +00:00
|
|
|
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*: \
|
2013-06-10 09:37:55 +00:00
|
|
|
QMAKE_COMPILER = gcc clang llvm
|
2012-09-13 20:17:33 +00:00
|
|
|
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
|
2015-02-06 17:00:57 +00:00
|
|
|
|
|
|
|
equals(MAKEFILE_GENERATOR, MSBUILD) \
|
|
|
|
|equals(MAKEFILE_GENERATOR, MSVC.NET) \
|
|
|
|
|isEmpty(QMAKE_SH) {
|
|
|
|
QMAKE_ZIP = zip -r -9
|
|
|
|
|
2016-11-11 09:02:34 +00:00
|
|
|
QMAKE_CD = cd /d
|
2015-02-06 17:00:57 +00:00
|
|
|
QMAKE_COPY = copy /y
|
|
|
|
QMAKE_COPY_FILE = $$QMAKE_COPY
|
|
|
|
QMAKE_COPY_DIR = xcopy /s /q /y /i
|
|
|
|
# xcopy copies the contained files if source is a directory. Deal with it.
|
|
|
|
CONFIG += copy_dir_files
|
|
|
|
QMAKE_MOVE = move
|
|
|
|
QMAKE_DEL_FILE = del
|
|
|
|
QMAKE_DEL_DIR = rmdir
|
|
|
|
QMAKE_DEL_TREE = rmdir /s /q
|
|
|
|
QMAKE_CHK_EXISTS = if not exist %1
|
|
|
|
QMAKE_CHK_DIR_EXISTS = if not exist # legacy
|
|
|
|
QMAKE_MKDIR = mkdir # legacy
|
|
|
|
QMAKE_MKDIR_CMD = if not exist %1 mkdir %1 & if not exist %1 exit 1
|
|
|
|
QMAKE_STREAM_EDITOR = $(QMAKE) -install sed
|
|
|
|
QMAKE_INSTALL_FILE = copy /y
|
|
|
|
QMAKE_INSTALL_PROGRAM = copy /y
|
|
|
|
} else {
|
|
|
|
QMAKE_TAR = tar -cf
|
|
|
|
QMAKE_GZIP = gzip -9f
|
|
|
|
|
2016-11-11 09:02:34 +00:00
|
|
|
QMAKE_CD = cd
|
2015-02-06 17:00:57 +00:00
|
|
|
QMAKE_COPY = cp -f
|
|
|
|
QMAKE_COPY_FILE = $$QMAKE_COPY
|
|
|
|
QMAKE_COPY_DIR = $$QMAKE_COPY -R
|
|
|
|
QMAKE_MOVE = mv -f
|
|
|
|
QMAKE_DEL_FILE = rm -f
|
|
|
|
QMAKE_DEL_DIR = rmdir
|
|
|
|
QMAKE_DEL_TREE = rm -rf
|
|
|
|
QMAKE_CHK_EXISTS = test -e %1 ||
|
|
|
|
QMAKE_CHK_DIR_EXISTS = test -d # legacy
|
|
|
|
QMAKE_MKDIR = mkdir -p # legacy
|
|
|
|
QMAKE_MKDIR_CMD = test -d %1 || mkdir -p %1
|
|
|
|
QMAKE_STREAM_EDITOR = sed
|
|
|
|
|
|
|
|
equals(QMAKE_HOST.os, Windows) {
|
|
|
|
MINGW_IN_SHELL = 1 # legacy
|
|
|
|
# Override built-ins.
|
|
|
|
QMAKE_DIR_SEP = /
|
|
|
|
QMAKE_DIRLIST_SEP = :
|
|
|
|
# Because install's ability to set permissions is not relevant on Windows,
|
|
|
|
# and git's msys does not provide it to start with.
|
|
|
|
QMAKE_INSTALL_FILE = cp -f
|
|
|
|
QMAKE_INSTALL_PROGRAM = cp -f
|
|
|
|
} else {
|
|
|
|
QMAKE_INSTALL_FILE = install -m 644 -p
|
|
|
|
QMAKE_INSTALL_PROGRAM = install -m 755 -p
|
|
|
|
}
|
|
|
|
}
|
|
|
|
QMAKE_INSTALL_DIR = $$QMAKE_COPY_DIR
|
|
|
|
equals(QMAKE_HOST.os, Windows) {
|
2015-05-28 16:19:51 +00:00
|
|
|
QMAKE_SYMBOLIC_LINK = $(QMAKE) -install ln -f -s
|
|
|
|
QMAKE_LN_SHLIB = $(QMAKE) -install ln -s
|
2015-02-06 17:00:57 +00:00
|
|
|
} else {
|
|
|
|
QMAKE_SYMBOLIC_LINK = ln -f -s
|
|
|
|
QMAKE_LN_SHLIB = ln -s
|
|
|
|
}
|