2012-12-11 21:22:23 +00:00
|
|
|
# This file is loaded by qmake right before each actual project file.
|
|
|
|
# Note that evaluating variable assignments from the command line
|
|
|
|
# still happens in between these two steps.
|
|
|
|
|
2011-04-27 10:05:43 +00:00
|
|
|
load(exclusive_builds)
|
2012-12-11 14:02:45 +00:00
|
|
|
CONFIG = \
|
2012-12-14 18:17:20 +00:00
|
|
|
lex yacc debug exceptions depend_includepath \
|
2012-12-11 14:02:45 +00:00
|
|
|
testcase_targets import_plugins import_qpa_plugin \
|
|
|
|
$$CONFIG
|
2015-05-22 13:02:23 +00:00
|
|
|
|
|
|
|
!build_pass:defined(QT_EDITION, var):!equals(QT_EDITION, "OpenSource"):!equals(QT_EDITION, "Preview") {
|
|
|
|
#
|
|
|
|
# call license checker (but cache result for one day)
|
|
|
|
#
|
|
|
|
today = $$section(_DATE_, " ", 0, 2)
|
|
|
|
!isEqual(QMAKE_LICHECK_TIMESTAMP, $$today) {
|
|
|
|
!system("$$system_quote($$system_path($$[QT_HOST_BINS/src]/$$QT_LICHECK)) check" \
|
|
|
|
"$$QT_RELEASE_DATE $$[QMAKE_SPEC] $$[QMAKE_XSPEC]"): \
|
|
|
|
error("License check failed! Giving up ...")
|
|
|
|
|
|
|
|
cache(QMAKE_LICHECK_TIMESTAMP, set stash, today)
|
|
|
|
}
|
|
|
|
unset(today)
|
|
|
|
}
|
2016-05-02 15:09:11 +00:00
|
|
|
|
|
|
|
isEmpty(QMAKE_DEFAULT_INCDIRS):!host_build {
|
|
|
|
#
|
|
|
|
# Get default include and library paths from compiler
|
|
|
|
#
|
|
|
|
gcc {
|
2016-06-27 11:43:45 +00:00
|
|
|
!equals(QMAKE_HOST.os, Windows) {
|
2016-05-02 15:09:11 +00:00
|
|
|
cmd_prefix = "LC_ALL=C"
|
|
|
|
cmd_suffix = "</dev/null >/dev/null"
|
|
|
|
} else {
|
|
|
|
cmd_prefix = "set LC_ALL=C&"
|
|
|
|
cmd_suffix = "<NUL >NUL"
|
|
|
|
}
|
|
|
|
output = $$system("$$cmd_prefix $$QMAKE_CXX $$QMAKE_CXXFLAGS -xc++ -E -v - 2>&1 $$cmd_suffix", lines)
|
|
|
|
add_includes = false
|
|
|
|
for (line, output) {
|
|
|
|
line ~= s/^ *// # remove leading spaces
|
|
|
|
contains(line, "LIBRARY_PATH=.*") {
|
|
|
|
line ~= s/^LIBRARY_PATH=// # remove leading LIBRARY_PATH=
|
|
|
|
paths = $$split(line, $$QMAKE_DIRLIST_SEP)
|
|
|
|
for (path, paths): \
|
|
|
|
QMAKE_DEFAULT_LIBDIRS += $$clean_path($$path)
|
|
|
|
} else: contains(line, "$${LITERAL_HASH}include <.*") { # #include <...> search starts here:
|
|
|
|
add_includes = true
|
2016-06-02 17:58:12 +00:00
|
|
|
} else: contains(line, "End of search.*") {
|
2016-05-02 15:09:11 +00:00
|
|
|
add_includes = false
|
2016-06-02 17:58:12 +00:00
|
|
|
} else: $$add_includes {
|
|
|
|
!contains(line, ".* \\(framework directory\\)"): \
|
|
|
|
QMAKE_DEFAULT_INCDIRS += $$clean_path($$line)
|
2016-05-02 15:09:11 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
QMAKE_DEFAULT_LIBDIRS = $$unique(QMAKE_DEFAULT_LIBDIRS)
|
2016-07-04 09:25:38 +00:00
|
|
|
} else: msvc {
|
|
|
|
LIB = $$getenv("LIB")
|
|
|
|
QMAKE_DEFAULT_LIBDIRS = $$split(LIB, $$QMAKE_DIRLIST_SEP)
|
|
|
|
INCLUDE = $$getenv("INCLUDE")
|
|
|
|
QMAKE_DEFAULT_INCDIRS = $$split(INCLUDE, $$QMAKE_DIRLIST_SEP)
|
2016-05-02 15:09:11 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
unix {
|
|
|
|
isEmpty(QMAKE_DEFAULT_INCDIRS): QMAKE_DEFAULT_INCDIRS = /usr/include /usr/local/include
|
|
|
|
isEmpty(QMAKE_DEFAULT_LIBDIRS): QMAKE_DEFAULT_LIBDIRS = /lib /usr/lib
|
|
|
|
}
|
|
|
|
|
|
|
|
!isEmpty(QMAKE_DEFAULT_INCDIRS): cache(QMAKE_DEFAULT_INCDIRS, set stash)
|
|
|
|
!isEmpty(QMAKE_DEFAULT_LIBDIRS): cache(QMAKE_DEFAULT_LIBDIRS, set stash)
|
|
|
|
}
|