2012-12-11 21:08:15 +00:00
|
|
|
#
|
|
|
|
# W A R N I N G
|
|
|
|
# -------------
|
|
|
|
#
|
|
|
|
# This file is not part of the Qt API. It exists purely as an
|
|
|
|
# implementation detail. It may change from version to version
|
|
|
|
# without notice, or even be removed.
|
|
|
|
#
|
|
|
|
# We mean it.
|
|
|
|
#
|
|
|
|
|
2012-06-04 15:10:11 +00:00
|
|
|
!contains(QMAKE_INTERNAL_INCLUDED_FILES, .*qmodule\\.pri) {
|
|
|
|
QMAKE_QT_MODULE = $$[QT_HOST_DATA/get]/mkspecs/qmodule.pri
|
|
|
|
!exists($$QMAKE_QT_MODULE)|!include($$QMAKE_QT_MODULE, "", true) {
|
2016-08-23 12:22:19 +00:00
|
|
|
debug(1, "Cannot load qmodule.pri!")
|
2012-06-04 15:10:11 +00:00
|
|
|
} else {
|
|
|
|
debug(1, "Loaded qmodule.pri from ($$QMAKE_QT_MODULE)")
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
debug(1, "Not loading qmodule.pri twice")
|
|
|
|
}
|
|
|
|
|
Rewrite qmake's exclusive-build feature
We used to compute the default exclusive build directory, eg 'debug', at
configure time, and then set OBJECTS_DIR, MOC_DIR, etc to include this
hard-coded default exclusive build directory. We then had to run a post-
process step where we replaced the 'debug' part with the current actual
exclusive build pass, eg 'release', resulting in long-standing bugs such
as QTBUG-491 where we end up replacing parts of the build output dirs
that were not part of the original exclusive build directory.
We now set the OBJECTS_DIR, MOC_DIR, etc defaults in configure like
before, but they do not include any exclusive-build information. The
exclusive build directory is handled as a separate step in default_post
where we adjust all entries in QMAKE_DIR_REPLACE to be exclusive
directories.
For backwards compatibility the new exclusive build behavior is only
enabled for variables named by QMAKE_DIR_REPLACE_SANE, which for Qt
itself applies globally to everything but DESTDIR, and for libs and
tools also applies to DESTDIR. The reason for leaving out DESTDIR in
the general case is because many tests and examples assume the old
behavior for DESTDIR. A side effect of including all the other
variables for Qt libs and tools is that the PCH output dir will be
uniformly set, which has been an issue on Windows in the past.
The addExclusiveBuilds function now takes two or more arguments,
each argument being the key for an exclusive build, which can be
customized eg. using $$key.{name,target,dir_affix}. Passing more
than two arguments results in three/four/etc-way exclusive builds,
eg debug/release/profile. Exclusive builds can also be combined, eg
static/shared + debug/release by making two calls to the function.
We also handle individual targets of combined exclusive builds,
eg static/shared + debug/release, meaning it is possible to run
'make debug' to build both static-debug and shared-debug.
Task-number: QTBUG-491
Change-Id: I02841dbbd065ac07d413dfb45cfcfe4c013674ac
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-10-08 17:41:16 +00:00
|
|
|
PRECOMPILED_DIR = .pch
|
|
|
|
OBJECTS_DIR = .obj
|
|
|
|
MOC_DIR = .moc
|
|
|
|
RCC_DIR = .rcc
|
|
|
|
UI_DIR = .uic
|
2014-06-24 18:19:16 +00:00
|
|
|
intel_icl {
|
|
|
|
# ICL 14.0 has a bug that makes it not find #includes in dirs starting with .
|
|
|
|
MOC_DIR = tmp/moc
|
|
|
|
RCC_DIR = tmp/rcc
|
|
|
|
UI_DIR = tmp/uic
|
|
|
|
}
|
Rewrite qmake's exclusive-build feature
We used to compute the default exclusive build directory, eg 'debug', at
configure time, and then set OBJECTS_DIR, MOC_DIR, etc to include this
hard-coded default exclusive build directory. We then had to run a post-
process step where we replaced the 'debug' part with the current actual
exclusive build pass, eg 'release', resulting in long-standing bugs such
as QTBUG-491 where we end up replacing parts of the build output dirs
that were not part of the original exclusive build directory.
We now set the OBJECTS_DIR, MOC_DIR, etc defaults in configure like
before, but they do not include any exclusive-build information. The
exclusive build directory is handled as a separate step in default_post
where we adjust all entries in QMAKE_DIR_REPLACE to be exclusive
directories.
For backwards compatibility the new exclusive build behavior is only
enabled for variables named by QMAKE_DIR_REPLACE_SANE, which for Qt
itself applies globally to everything but DESTDIR, and for libs and
tools also applies to DESTDIR. The reason for leaving out DESTDIR in
the general case is because many tests and examples assume the old
behavior for DESTDIR. A side effect of including all the other
variables for Qt libs and tools is that the PCH output dir will be
uniformly set, which has been an issue on Windows in the past.
The addExclusiveBuilds function now takes two or more arguments,
each argument being the key for an exclusive build, which can be
customized eg. using $$key.{name,target,dir_affix}. Passing more
than two arguments results in three/four/etc-way exclusive builds,
eg debug/release/profile. Exclusive builds can also be combined, eg
static/shared + debug/release by making two calls to the function.
We also handle individual targets of combined exclusive builds,
eg static/shared + debug/release, meaning it is possible to run
'make debug' to build both static-debug and shared-debug.
Task-number: QTBUG-491
Change-Id: I02841dbbd065ac07d413dfb45cfcfe4c013674ac
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-10-08 17:41:16 +00:00
|
|
|
|
|
|
|
QMAKE_DIR_REPLACE_SANE = PRECOMPILED_DIR OBJECTS_DIR MOC_DIR RCC_DIR UI_DIR
|
|
|
|
|
2013-02-28 13:27:57 +00:00
|
|
|
# force_independent can be set externally. prefix_build not.
|
2013-01-28 19:25:33 +00:00
|
|
|
!exists($$[QT_HOST_DATA]/.qmake.cache): \
|
2013-02-28 13:27:57 +00:00
|
|
|
CONFIG += prefix_build force_independent
|
2013-01-28 19:25:33 +00:00
|
|
|
|
2013-02-28 13:27:57 +00:00
|
|
|
!build_pass:!isEmpty(_QMAKE_SUPER_CACHE_):force_independent {
|
2012-09-18 16:26:09 +00:00
|
|
|
# When doing a -prefix build of top-level qt5/qt.pro, we need to announce
|
2014-05-12 13:20:02 +00:00
|
|
|
# this repo's output dir to the other repos.
|
|
|
|
MODULE_BASE_OUTDIR = $$shadowed($$dirname(_QMAKE_CONF_))
|
|
|
|
!contains(QTREPOS, $$MODULE_BASE_OUTDIR): \
|
|
|
|
cache(QTREPOS, add super, MODULE_BASE_OUTDIR)
|
|
|
|
# This repo's module pris' location needs to be made known to qmake.
|
|
|
|
isEmpty(MODULE_QMAKE_OUTDIR): MODULE_QMAKE_OUTDIR = $$MODULE_BASE_OUTDIR
|
2012-09-18 16:26:09 +00:00
|
|
|
modpath = $$MODULE_QMAKE_OUTDIR/mkspecs/modules
|
|
|
|
!contains(QMAKEMODULES, $$modpath): \
|
|
|
|
cache(QMAKEMODULES, add super, modpath)
|
|
|
|
unset(modpath)
|
|
|
|
}
|
|
|
|
|
2016-03-08 18:38:59 +00:00
|
|
|
# Apply extra compiler flags passed via configure last.
|
|
|
|
CONFIG = qt_build_extra $$CONFIG
|
|
|
|
|
2015-09-23 16:46:04 +00:00
|
|
|
# Don't actually try to install anything in non-prefix builds.
|
|
|
|
# This is much easier and safer than making every single INSTALLS
|
|
|
|
# assignment conditional.
|
|
|
|
!prefix_build: \
|
|
|
|
CONFIG += qt_clear_installs
|
|
|
|
|
2013-03-08 21:23:30 +00:00
|
|
|
cross_compile: \
|
|
|
|
CONFIG += force_bootstrap
|
|
|
|
|
2016-02-16 14:29:59 +00:00
|
|
|
android|uikit|winrt: \
|
2015-11-18 12:09:26 +00:00
|
|
|
CONFIG += builtin_testdata
|
|
|
|
|
2012-11-27 16:01:09 +00:00
|
|
|
CONFIG += \
|
|
|
|
create_prl link_prl \
|
2012-11-28 13:51:40 +00:00
|
|
|
prepare_docs qt_docs_targets \
|
2012-11-27 16:01:09 +00:00
|
|
|
no_private_qt_headers_warning QTDIR_build \
|
2016-04-20 19:11:45 +00:00
|
|
|
qt_example_installs \
|
2012-11-27 16:01:09 +00:00
|
|
|
# Qt modules get compiled without exceptions enabled by default.
|
|
|
|
# However, testcases should be still built with exceptions.
|
|
|
|
exceptions_off testcase_exceptions
|
2013-04-25 15:12:07 +00:00
|
|
|
|
2016-03-03 13:12:16 +00:00
|
|
|
# Under Windows, this is neither necessary (transitive deps are automatically
|
|
|
|
# resolved), nor functional (.res files end up in .prl files and break things).
|
|
|
|
unix: CONFIG += explicitlib
|
|
|
|
|
2013-04-25 15:12:07 +00:00
|
|
|
|
|
|
|
defineTest(qtBuildPart) {
|
|
|
|
bp = $$eval($$upper($$section(_QMAKE_CONF_, /, -2, -2))_BUILD_PARTS)
|
|
|
|
isEmpty(bp): bp = $$QT_BUILD_PARTS
|
|
|
|
contains(bp, $$1): return(true)
|
|
|
|
return(false)
|
|
|
|
}
|
|
|
|
|
|
|
|
defineTest(qtNomakeTools) {
|
|
|
|
qtBuildPart(tools): return()
|
|
|
|
for (d, 1) {
|
|
|
|
$${d}.CONFIG += no_default_target no_default_install
|
|
|
|
export($${d}.CONFIG)
|
|
|
|
}
|
|
|
|
}
|