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.
|
|
|
|
#
|
|
|
|
|
2013-04-26 12:15:34 +00:00
|
|
|
load(qt_app)
|
2012-10-26 17:59:09 +00:00
|
|
|
|
2012-12-14 18:17:20 +00:00
|
|
|
CONFIG += console
|
2015-10-13 12:43:41 +00:00
|
|
|
DEFINES *= QT_USE_QSTRINGBUILDER
|
2012-11-15 13:49:19 +00:00
|
|
|
|
2012-07-03 17:26:36 +00:00
|
|
|
# If we are doing a prefix build, create a "module" pri which enables
|
|
|
|
# qtPrepareTool() to work with the non-installed build.
|
2013-03-08 21:23:30 +00:00
|
|
|
# Non-bootstrapped tools always need this because of the environment setup.
|
2015-10-12 07:55:30 +00:00
|
|
|
!build_pass:if(!host_build|!force_bootstrap|force_independent|!isEmpty(HOST_QT_TOOLS)) {
|
2012-07-03 17:26:36 +00:00
|
|
|
isEmpty(MODULE):MODULE = $$TARGET
|
|
|
|
|
2012-10-23 20:15:43 +00:00
|
|
|
load(qt_build_paths)
|
2012-07-03 17:26:36 +00:00
|
|
|
|
2012-10-24 13:03:49 +00:00
|
|
|
TOOL_PRI = $$MODULE_QMAKE_OUTDIR/mkspecs/modules/qt_tool_$${MODULE}.pri
|
2012-07-03 17:26:36 +00:00
|
|
|
|
2015-11-05 10:53:43 +00:00
|
|
|
vars = binary depends
|
2015-10-12 07:55:30 +00:00
|
|
|
|
|
|
|
isEmpty(HOST_QT_TOOLS) {
|
|
|
|
load(resolve_target)
|
|
|
|
|
|
|
|
!host_build|!force_bootstrap: MODULE_DEPENDS = $$replace(QT, -private$, _private)
|
|
|
|
|
|
|
|
!isEmpty(QT_TOOL_ENV) {
|
|
|
|
vars += envvars
|
|
|
|
module_var_names =
|
|
|
|
module_var_sets =
|
|
|
|
for(var, QT_TOOL_ENV) {
|
|
|
|
vars += env.$${var}.name env.$${var}.value
|
|
|
|
module_var_names += QT_TOOL.$${MODULE}.env.$${var}
|
|
|
|
module_var_sets += \
|
|
|
|
"QT_TOOL.$${MODULE}.env.$${var}.name = $$val_escape($${var}.name)" \
|
|
|
|
"QT_TOOL.$${MODULE}.env.$${var}.value = $$val_escape($${var}.value)"
|
|
|
|
}
|
|
|
|
module_envvars = \
|
|
|
|
"QT_TOOL.$${MODULE}.envvars = $$module_var_names" \
|
|
|
|
$$module_var_sets
|
|
|
|
} else {
|
|
|
|
module_envvars =
|
2013-08-26 14:13:54 +00:00
|
|
|
}
|
2015-10-12 07:55:30 +00:00
|
|
|
|
|
|
|
bin = $$system_path($$QMAKE_RESOLVED_TARGET)
|
2013-08-26 14:13:54 +00:00
|
|
|
} else {
|
2015-10-12 07:55:30 +00:00
|
|
|
bin = $${HOST_QT_TOOLS}/$${TARGET}
|
|
|
|
equals(QMAKE_HOST.os, Windows): bin = $${bin}.exe
|
|
|
|
bin = $$system_path($$bin)
|
2013-08-26 14:13:54 +00:00
|
|
|
}
|
2015-10-12 07:55:30 +00:00
|
|
|
|
2013-06-13 15:28:52 +00:00
|
|
|
TOOL_PRI_CONT = \
|
2014-05-21 13:14:45 +00:00
|
|
|
"QT_TOOL.$${MODULE}.binary = $$val_escape(bin)" \
|
2015-11-05 10:53:43 +00:00
|
|
|
"QT_TOOL.$${MODULE}.depends =$$join(MODULE_DEPENDS, " ", " ")" \
|
2013-08-26 14:13:54 +00:00
|
|
|
$$module_envvars
|
2012-07-03 17:26:36 +00:00
|
|
|
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)
|
2013-08-26 14:13:54 +00:00
|
|
|
for(var, vars): \
|
2013-06-13 15:28:52 +00:00
|
|
|
cache(QT_TOOL.$${MODULE}.$$var, transient)
|
2012-07-03 17:26:36 +00:00
|
|
|
|
|
|
|
}
|