d3d8ac3546
bootstrapping is only necessary if we are cross-compiling or have a circular build dependency. Change-Id: I17244457652ca9d4fc797043e57070c2ae3ee5d1 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
67 lines
1.8 KiB
Plaintext
67 lines
1.8 KiB
Plaintext
#
|
|
# 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.
|
|
#
|
|
|
|
TEMPLATE = app
|
|
|
|
load(qt_build_paths)
|
|
DESTDIR = $$MODULE_BASE_OUTDIR/bin
|
|
|
|
CONFIG += console
|
|
isEmpty(QMAKE_INFO_PLIST): CONFIG -= app_bundle
|
|
|
|
host_build: QT -= gui # no host tool will ever use gui
|
|
host_build:force_bootstrap {
|
|
!build_pass: CONFIG += release
|
|
contains(QT, core(-private)?|xml) {
|
|
QT -= core core-private xml
|
|
QT += bootstrap-private
|
|
}
|
|
target.path = $$[QT_HOST_BINS]
|
|
} else {
|
|
!build_pass:contains(QT_CONFIG, build_all): CONFIG += release
|
|
target.path = $$[QT_INSTALL_BINS]
|
|
}
|
|
INSTALLS += target
|
|
|
|
load(qt_targets)
|
|
load(qt_common)
|
|
|
|
# If we are doing a prefix build, create a "module" pri which enables
|
|
# qtPrepareTool() to work with the non-installed build.
|
|
# Non-bootstrapped tools always need this because of the environment setup.
|
|
!build_pass:if(!host_build|!force_bootstrap|prefix_build) {
|
|
|
|
isEmpty(MODULE):MODULE = $$TARGET
|
|
|
|
MODULE_DEPENDS = $$replace(QT, -private$, )
|
|
|
|
load(qt_build_paths)
|
|
|
|
load(resolve_target)
|
|
cmd = $$shell_path($$QMAKE_RESOLVED_TARGET)
|
|
!host_build|!force_bootstrap: qtAddTargetEnv(cmd)
|
|
|
|
TOOL_PRI = $$MODULE_QMAKE_OUTDIR/mkspecs/modules/qt_tool_$${MODULE}.pri
|
|
|
|
TOOL_PRI_CONT = "QT_TOOL.$${MODULE}.command = $$val_escape(cmd)"
|
|
write_file($$TOOL_PRI, TOOL_PRI_CONT)|error("Aborting.")
|
|
|
|
# Then, inject the new tool into the current cache state
|
|
!contains(QMAKE_INTERNAL_INCLUDED_FILES, $$TOOL_PRI) { # before the actual include()!
|
|
added = $$TOOL_PRI
|
|
cache(QMAKE_INTERNAL_INCLUDED_FILES, add transient, added)
|
|
unset(added)
|
|
}
|
|
include($$TOOL_PRI)
|
|
cache(QT_TOOL.$${MODULE}.command, transient)
|
|
|
|
}
|