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-01-28 20:07:14 +00:00
|
|
|
load(qt_build_paths)
|
2013-06-07 14:23:25 +00:00
|
|
|
# Pre-generated headers in the source tree and
|
|
|
|
# - shadow build or
|
|
|
|
# - non-shadow non-prefix build of a module which is not qtbase (because the build-time
|
|
|
|
# generated headers all end up in qtbase).
|
|
|
|
!git_build:if(!equals(_PRO_FILE_PWD_, $$OUT_PWD) \
|
|
|
|
|if(!prefix_build:!equals(MODULE_BASE_INDIR, $$[QT_HOST_PREFIX]))): \
|
|
|
|
CONFIG += split_incpath
|
|
|
|
force_independent|split_incpath: \
|
|
|
|
CONFIG += need_fwd_pri
|
2013-10-21 19:05:35 +00:00
|
|
|
mod_work_pfx = $$MODULE_QMAKE_OUTDIR/mkspecs/modules
|
2013-06-07 14:23:25 +00:00
|
|
|
need_fwd_pri: \
|
2013-10-21 19:05:35 +00:00
|
|
|
mod_inst_pfx = $$MODULE_QMAKE_OUTDIR/mkspecs/modules-inst
|
2013-01-28 19:25:44 +00:00
|
|
|
else: \
|
2013-10-21 19:05:35 +00:00
|
|
|
mod_inst_pfx = $$mod_work_pfx
|
|
|
|
!internal_module {
|
|
|
|
MODULE_ID = $$MODULE
|
2015-04-16 16:09:01 +00:00
|
|
|
mods_to_load = $$MODULE
|
|
|
|
!no_private_module {
|
|
|
|
MODULE_PRIVATE_PRI = $$mod_inst_pfx/qt_lib_$${MODULE}_private.pri
|
|
|
|
mods_to_load += $${MODULE}_private
|
|
|
|
}
|
2013-10-21 19:05:35 +00:00
|
|
|
} else {
|
|
|
|
MODULE_ID = $${MODULE}_private
|
|
|
|
mods_to_load = $${MODULE}_private
|
|
|
|
}
|
|
|
|
need_fwd_pri: \
|
|
|
|
pris_to_load = $$MODULE_ID
|
|
|
|
else: \
|
|
|
|
pris_to_load = $$mods_to_load
|
|
|
|
MODULE_PRI = $$mod_inst_pfx/qt_lib_$${MODULE_ID}.pri
|
|
|
|
MODULE_FWD_PRI = $$mod_work_pfx/qt_lib_$${MODULE_ID}.pri
|
2013-01-28 20:07:14 +00:00
|
|
|
|
2012-04-16 12:13:12 +00:00
|
|
|
!build_pass {
|
|
|
|
|
2013-01-28 20:07:14 +00:00
|
|
|
# Create a module .pri file
|
2013-05-08 13:30:56 +00:00
|
|
|
host_build: \
|
|
|
|
module_libs = "\$\$QT_MODULE_HOST_LIB_BASE"
|
2013-01-28 20:07:14 +00:00
|
|
|
else: \
|
2013-05-08 13:30:56 +00:00
|
|
|
module_libs = "\$\$QT_MODULE_LIB_BASE"
|
2013-02-01 16:30:31 +00:00
|
|
|
!isEmpty(QT_PRIVATE): \
|
2013-10-21 19:05:35 +00:00
|
|
|
module_rundep = "QT.$${MODULE_ID}.run_depends = $$replace(QT_PRIVATE, -private$, _private)"
|
2013-02-01 16:30:31 +00:00
|
|
|
else: \
|
|
|
|
module_rundep =
|
2015-04-27 16:20:04 +00:00
|
|
|
static: \
|
2013-07-04 16:20:44 +00:00
|
|
|
module_build_type = staticlib
|
2015-11-11 16:59:18 +00:00
|
|
|
else: qt_framework: \
|
2013-07-04 16:20:44 +00:00
|
|
|
module_build_type = lib_bundle
|
2013-01-28 20:07:14 +00:00
|
|
|
else: \
|
|
|
|
module_build_type =
|
2015-04-27 16:20:04 +00:00
|
|
|
equals(TEMPLATE, aux): \
|
|
|
|
module_build_type += no_link
|
2013-07-04 16:20:44 +00:00
|
|
|
internal_module: \
|
|
|
|
module_build_type += internal_module
|
2014-11-23 05:00:34 +00:00
|
|
|
ltcg: \
|
|
|
|
module_build_type += ltcg
|
2013-01-28 20:07:14 +00:00
|
|
|
!isEmpty(MODULE_CONFIG): \
|
2013-10-21 19:05:35 +00:00
|
|
|
module_config = "QT.$${MODULE_ID}.CONFIG = $$MODULE_CONFIG"
|
2013-01-28 20:07:14 +00:00
|
|
|
else: \
|
|
|
|
module_config =
|
2014-04-02 20:17:40 +00:00
|
|
|
!isEmpty(MODULE_PLUGIN_TYPES): \
|
|
|
|
module_plugtypes = "QT.$${MODULE_ID}.plugin_types = $$replace(MODULE_PLUGIN_TYPES, /.*$, )"
|
|
|
|
else: \
|
|
|
|
module_plugtypes =
|
2014-10-13 12:47:13 +00:00
|
|
|
!isEmpty(MODULE_MASTER_HEADER): \
|
|
|
|
module_master = "QT.$${MODULE_ID}.master_header = $$MODULE_MASTER_HEADER"
|
|
|
|
else: \
|
|
|
|
module_master =
|
2013-03-05 10:38:24 +00:00
|
|
|
!no_module_headers:!minimal_syncqt {
|
2013-05-28 09:57:01 +00:00
|
|
|
MODULE_INCLUDES = \$\$QT_MODULE_INCLUDE_BASE \$\$QT_MODULE_INCLUDE_BASE/$$MODULE_INCNAME
|
|
|
|
MODULE_PRIVATE_INCLUDES = \$\$QT_MODULE_INCLUDE_BASE/$$MODULE_INCNAME/$$VERSION \
|
|
|
|
\$\$QT_MODULE_INCLUDE_BASE/$$MODULE_INCNAME/$$VERSION/$$MODULE_INCNAME
|
2013-01-28 20:07:14 +00:00
|
|
|
}
|
2015-05-20 11:30:54 +00:00
|
|
|
split_incpath {
|
2013-06-07 14:23:25 +00:00
|
|
|
MODULE_SHADOW_INCLUDES = $$replace(MODULE_INCLUDES, ^\\\$\\\$QT_MODULE_INCLUDE_BASE, \
|
|
|
|
$$MODULE_BASE_OUTDIR/include)
|
2015-05-20 11:30:54 +00:00
|
|
|
generated_privates: \
|
|
|
|
MODULE_SHADOW_PRIVATE_INCLUDES = $$replace(MODULE_PRIVATE_INCLUDES, ^\\\$\\\$QT_MODULE_INCLUDE_BASE, \
|
|
|
|
$$MODULE_BASE_OUTDIR/include)
|
|
|
|
}
|
2013-06-05 11:20:37 +00:00
|
|
|
MODULE_INCLUDES += $$MODULE_AUX_INCLUDES
|
|
|
|
MODULE_PRIVATE_INCLUDES += $$MODULE_PRIVATE_AUX_INCLUDES
|
2013-10-21 19:05:35 +00:00
|
|
|
internal_module: \
|
|
|
|
MODULE_INCLUDES += $$MODULE_PRIVATE_INCLUDES
|
2015-05-20 11:30:54 +00:00
|
|
|
split_incpath {
|
2014-11-27 13:12:40 +00:00
|
|
|
MODULE_FWD_PRI_CONT_SUFFIX += "QT.$${MODULE_ID}.includes += $$val_escape(MODULE_SHADOW_INCLUDES)"
|
2015-05-20 11:30:54 +00:00
|
|
|
generated_privates: \
|
|
|
|
MODULE_FWD_PRI_CONT_SUFFIX += "QT.$${MODULE}_private.includes += $$val_escape(MODULE_SHADOW_PRIVATE_INCLUDES)"
|
|
|
|
}
|
2013-01-28 20:07:14 +00:00
|
|
|
MODULE_PRI_CONT = \
|
2013-10-21 19:05:35 +00:00
|
|
|
"QT.$${MODULE_ID}.VERSION = $${VERSION}" \
|
|
|
|
"QT.$${MODULE_ID}.MAJOR_VERSION = $$section(VERSION, ., 0, 0)" \
|
|
|
|
"QT.$${MODULE_ID}.MINOR_VERSION = $$section(VERSION, ., 1, 1)" \
|
|
|
|
"QT.$${MODULE_ID}.PATCH_VERSION = $$section(VERSION, ., 2, 2)" \
|
2013-01-28 20:07:14 +00:00
|
|
|
"" \
|
2013-10-21 19:05:35 +00:00
|
|
|
"QT.$${MODULE_ID}.name = $$TARGET" \
|
|
|
|
"QT.$${MODULE_ID}.libs = $$module_libs" \
|
2014-10-13 12:47:13 +00:00
|
|
|
$$module_master \
|
2013-10-21 19:05:35 +00:00
|
|
|
"QT.$${MODULE_ID}.includes = $$MODULE_INCLUDES"
|
2013-05-08 13:30:56 +00:00
|
|
|
!host_build: MODULE_PRI_CONT += \
|
2013-10-21 19:05:35 +00:00
|
|
|
"QT.$${MODULE_ID}.bins = \$\$QT_MODULE_BIN_BASE" \
|
|
|
|
"QT.$${MODULE_ID}.libexecs = \$\$QT_MODULE_LIBEXEC_BASE" \
|
|
|
|
"QT.$${MODULE_ID}.plugins = \$\$QT_MODULE_PLUGIN_BASE" \
|
|
|
|
"QT.$${MODULE_ID}.imports = \$\$QT_MODULE_IMPORT_BASE" \
|
2013-10-23 10:40:05 +00:00
|
|
|
"QT.$${MODULE_ID}.qml = \$\$QT_MODULE_QML_BASE" \
|
2014-04-02 20:17:40 +00:00
|
|
|
$$module_plugtypes
|
2013-05-08 13:30:56 +00:00
|
|
|
MODULE_PRI_CONT += \
|
2013-10-21 19:05:35 +00:00
|
|
|
"QT.$${MODULE_ID}.depends =$$join(MODULE_DEPENDS, " ", " ")" \
|
2013-02-01 16:30:31 +00:00
|
|
|
$$module_rundep \
|
2013-10-21 19:05:35 +00:00
|
|
|
"QT.$${MODULE_ID}.module_config =$$join(module_build_type, " ", " ")" \
|
2013-01-28 20:07:14 +00:00
|
|
|
$$module_config \
|
2014-11-27 13:12:40 +00:00
|
|
|
"QT.$${MODULE_ID}.DEFINES = $$val_escape(MODULE_DEFINES)" \
|
2013-01-28 20:07:14 +00:00
|
|
|
"" \
|
2013-03-01 12:11:06 +00:00
|
|
|
"QT_MODULES += $$MODULE"
|
2013-01-28 20:07:14 +00:00
|
|
|
write_file($$MODULE_PRI, MODULE_PRI_CONT)|error("Aborting.")
|
2015-03-16 12:05:46 +00:00
|
|
|
!internal_module:!no_private_module {
|
2013-10-21 19:05:35 +00:00
|
|
|
module_build_type += internal_module no_link
|
|
|
|
MODULE_PRIVATE_PRI_CONT = \
|
|
|
|
"QT.$${MODULE}_private.VERSION = $${VERSION}" \
|
|
|
|
"QT.$${MODULE}_private.MAJOR_VERSION = $$section(VERSION, ., 0, 0)" \
|
|
|
|
"QT.$${MODULE}_private.MINOR_VERSION = $$section(VERSION, ., 1, 1)" \
|
|
|
|
"QT.$${MODULE}_private.PATCH_VERSION = $$section(VERSION, ., 2, 2)" \
|
|
|
|
"" \
|
|
|
|
"QT.$${MODULE}_private.name = $${TARGET}" \ # Same name as base module
|
|
|
|
"QT.$${MODULE}_private.libs = $$module_libs" \
|
|
|
|
"QT.$${MODULE}_private.includes = $$MODULE_PRIVATE_INCLUDES" \
|
|
|
|
"QT.$${MODULE}_private.depends = $$replace($$list($$MODULE $$QT_FOR_PRIVATE), -private$, _private)" \
|
|
|
|
"QT.$${MODULE}_private.module_config =$$join(module_build_type, " ", " ")"
|
|
|
|
write_file($$MODULE_PRIVATE_PRI, MODULE_PRIVATE_PRI_CONT)|error("Aborting.")
|
|
|
|
}
|
|
|
|
MODULE_PRI_FILES = $$MODULE_PRI $$MODULE_PRIVATE_PRI
|
2012-04-16 12:13:12 +00:00
|
|
|
|
2013-06-07 14:23:25 +00:00
|
|
|
need_fwd_pri {
|
|
|
|
|
|
|
|
split_incpath: \
|
|
|
|
MODULE_BASE_INCDIR = $$MODULE_BASE_INDIR
|
|
|
|
else: \
|
|
|
|
MODULE_BASE_INCDIR = $$MODULE_BASE_OUTDIR
|
2012-04-16 12:13:12 +00:00
|
|
|
|
2013-01-28 19:25:44 +00:00
|
|
|
# Create a forwarding module .pri file
|
|
|
|
MODULE_FWD_PRI_CONT = \
|
2014-11-27 13:12:40 +00:00
|
|
|
"QT_MODULE_BIN_BASE = $$val_escape(MODULE_BASE_OUTDIR)/bin" \
|
|
|
|
"QT_MODULE_INCLUDE_BASE = $$val_escape(MODULE_BASE_INCDIR)/include" \
|
|
|
|
"QT_MODULE_IMPORT_BASE = $$val_escape(MODULE_BASE_OUTDIR)/imports" \
|
|
|
|
"QT_MODULE_QML_BASE = $$val_escape(MODULE_BASE_OUTDIR)/qml" \
|
|
|
|
"QT_MODULE_LIB_BASE = $$val_escape(MODULE_BASE_OUTDIR)/lib" \
|
|
|
|
"QT_MODULE_HOST_LIB_BASE = $$val_escape(MODULE_BASE_OUTDIR)/lib" \
|
|
|
|
"QT_MODULE_LIBEXEC_BASE = $$val_escape(MODULE_BASE_OUTDIR)/libexec" \
|
|
|
|
"QT_MODULE_PLUGIN_BASE = $$val_escape(MODULE_BASE_OUTDIR)/plugins" \
|
|
|
|
"include($$val_escape(MODULE_PRI))" \
|
2014-07-25 17:44:50 +00:00
|
|
|
"QT.$${MODULE_ID}.priority = 1"
|
2015-03-16 12:05:46 +00:00
|
|
|
!internal_module:!no_private_module: MODULE_FWD_PRI_CONT += \
|
2014-11-27 13:12:40 +00:00
|
|
|
"include($$val_escape(MODULE_PRIVATE_PRI))" \
|
2014-07-25 17:44:50 +00:00
|
|
|
"QT.$${MODULE}_private.priority = 1"
|
2013-10-21 19:05:35 +00:00
|
|
|
MODULE_FWD_PRI_CONT += $$MODULE_FWD_PRI_CONT_SUFFIX
|
2013-01-28 19:25:44 +00:00
|
|
|
write_file($$MODULE_FWD_PRI, MODULE_FWD_PRI_CONT)|error("Aborting.")
|
|
|
|
touch($$MODULE_FWD_PRI, $$MODULE_PRI)
|
|
|
|
MODULE_PRI_FILES += $$MODULE_FWD_PRI
|
|
|
|
|
2013-06-07 14:23:25 +00:00
|
|
|
} else {
|
2013-01-28 19:25:44 +00:00
|
|
|
|
2013-06-07 12:06:24 +00:00
|
|
|
# This is needed for the direct include() below. Mirrors qt_config.prf
|
2013-01-28 19:25:44 +00:00
|
|
|
QT_MODULE_BIN_BASE = $$[QT_INSTALL_BINS]
|
|
|
|
QT_MODULE_INCLUDE_BASE = $$[QT_INSTALL_HEADERS]
|
|
|
|
QT_MODULE_IMPORT_BASE = $$[QT_INSTALL_IMPORTS]
|
|
|
|
QT_MODULE_QML_BASE = $$[QT_INSTALL_QML]
|
|
|
|
QT_MODULE_LIB_BASE = $$[QT_INSTALL_LIBS]
|
2013-05-08 13:30:56 +00:00
|
|
|
QT_MODULE_HOST_LIB_BASE = $$[QT_HOST_LIBS]
|
2013-01-28 19:25:44 +00:00
|
|
|
QT_MODULE_LIBEXEC_BASE = $$[QT_INSTALL_LIBEXECS]
|
|
|
|
QT_MODULE_PLUGIN_BASE = $$[QT_INSTALL_PLUGINS]
|
2012-04-16 12:13:12 +00:00
|
|
|
|
|
|
|
}
|
2013-01-28 19:25:44 +00:00
|
|
|
|
|
|
|
# Then, inject the new module into the current cache state
|
|
|
|
!contains(QMAKE_INTERNAL_INCLUDED_FILES, $$MODULE_PRI): \ # before the actual include()!
|
|
|
|
cache(QMAKE_INTERNAL_INCLUDED_FILES, add transient, MODULE_PRI_FILES)
|
2013-10-21 19:05:35 +00:00
|
|
|
for(pri, pris_to_load): \
|
|
|
|
include($$mod_work_pfx/qt_lib_$${pri}.pri)
|
|
|
|
for(mod, mods_to_load) {
|
|
|
|
for(var, $$list(VERSION MAJOR_VERSION MINOR_VERSION PATCH_VERSION \
|
2014-04-22 11:27:10 +00:00
|
|
|
name depends run_depends plugin_types module_config CONFIG DEFINES \
|
2014-07-25 17:44:50 +00:00
|
|
|
priority includes bins libs libexecs plugins imports qml \
|
2013-10-21 19:05:35 +00:00
|
|
|
)):defined(QT.$${mod}.$$var, var):cache(QT.$${mod}.$$var, transient)
|
|
|
|
}
|
2013-03-01 12:11:06 +00:00
|
|
|
cache(QT_MODULES, transient)
|
2012-04-16 12:13:12 +00:00
|
|
|
|
|
|
|
} # !build_pass
|
|
|
|
|
|
|
|
# Schedule the regular .pri file for installation
|
|
|
|
CONFIG += qt_install_module
|