2012-04-16 12:13:12 +00:00
|
|
|
!build_pass {
|
|
|
|
|
|
|
|
QTDIR = $$[QT_HOST_PREFIX]
|
|
|
|
exists($$QTDIR/.qmake.cache) {
|
|
|
|
mod_component_base = $$QTDIR
|
|
|
|
mod_qmake_base = $$QTDIR
|
|
|
|
} else {
|
|
|
|
mod_component_base = $$MODULE_BASE_OUTDIR
|
|
|
|
mod_qmake_base = $$MODULE_QMAKE_OUTDIR
|
|
|
|
}
|
|
|
|
# Permit modules to enforce being built outside QTDIR.
|
|
|
|
force_independent: mod_component_base = $$MODULE_BASE_OUTDIR
|
|
|
|
|
|
|
|
MODULE_FWD_PRI = $$mod_qmake_base/mkspecs/modules/qt_$${MODULE}.pri
|
|
|
|
|
|
|
|
# Create a forwarding module .pri file
|
|
|
|
MODULE_FWD_PRI_CONT = \
|
|
|
|
"QT_MODULE_BASE = $$MODULE_BASE_DIR" \
|
|
|
|
"QT_MODULE_BIN_BASE = $$mod_component_base/bin" \
|
|
|
|
"QT_MODULE_INCLUDE_BASE = $$MODULE_BASE_OUTDIR/include" \
|
|
|
|
"QT_MODULE_IMPORT_BASE = $$mod_component_base/imports" \
|
|
|
|
"QT_MODULE_LIB_BASE = $$mod_component_base/lib" \
|
|
|
|
"QT_MODULE_PLUGIN_BASE = $$mod_component_base/plugins" \
|
|
|
|
"include($$MODULE_PRI)"
|
|
|
|
write_file($$MODULE_FWD_PRI, MODULE_FWD_PRI_CONT)|error("Aborting.")
|
|
|
|
touch($$MODULE_FWD_PRI, $$MODULE_PRI)
|
|
|
|
|
|
|
|
# Then, inject the new module into the current cache state
|
|
|
|
!contains(QMAKE_INTERNAL_INCLUDED_FILES, $$MODULE_PRI) { # before the actual include()!
|
|
|
|
added = $$MODULE_PRI $$MODULE_FWD_PRI
|
|
|
|
cache(QMAKE_INTERNAL_INCLUDED_FILES, add transient, added)
|
|
|
|
unset(added)
|
|
|
|
}
|
|
|
|
include($$MODULE_FWD_PRI)
|
|
|
|
for(var, $$list(VERSION MAJOR_VERSION MINOR_VERSION PATCH_VERSION \
|
2012-04-19 17:21:32 +00:00
|
|
|
name depends private_depends module_config CONFIG DEFINES sources \
|
2012-04-16 12:13:12 +00:00
|
|
|
includes private_includes bins libs plugins imports \
|
|
|
|
)):defined(QT.$${MODULE}.$$var, var):cache(QT.$${MODULE}.$$var, transient)
|
|
|
|
cache(QT_CONFIG, transient)
|
|
|
|
|
|
|
|
} # !build_pass
|
|
|
|
|
|
|
|
# Schedule the regular .pri file for installation
|
|
|
|
CONFIG += qt_install_module
|