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-01-28 19:25:44 +00:00
|
|
|
MODULE_FWD_PRI = $$MODULE_QMAKE_OUTDIR/mkspecs/modules/qt_lib_$${MODULE}.pri
|
2013-02-28 13:27:57 +00:00
|
|
|
force_independent: \
|
2013-01-28 19:25:44 +00:00
|
|
|
MODULE_PRI = $$MODULE_QMAKE_OUTDIR/mkspecs/modules-inst/qt_lib_$${MODULE}.pri
|
|
|
|
else: \
|
|
|
|
MODULE_PRI = $$MODULE_FWD_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"
|
|
|
|
unix:!static {
|
|
|
|
host_build: \
|
|
|
|
module_rpath = "QT.$${MODULE}.rpath = $$[QT_HOST_LIBS]"
|
|
|
|
else: \
|
|
|
|
module_rpath = "QT.$${MODULE}.rpath = $$[QT_INSTALL_LIBS/raw]"
|
|
|
|
} else {
|
2013-01-28 20:07:14 +00:00
|
|
|
module_rpath =
|
2013-05-08 13:30:56 +00:00
|
|
|
}
|
2013-01-28 20:07:14 +00:00
|
|
|
!isEmpty(QT_FOR_PRIVATE) {
|
|
|
|
contains(QT_FOR_PRIVATE, .*-private$):error("QT_FOR_PRIVATE may not contain *-private.")
|
|
|
|
module_privdep = "QT.$${MODULE}.private_depends = $$QT_FOR_PRIVATE"
|
|
|
|
} else {
|
|
|
|
module_privdep =
|
|
|
|
}
|
2013-02-01 16:30:31 +00:00
|
|
|
!isEmpty(QT_PRIVATE): \
|
|
|
|
module_rundep = "QT.$${MODULE}.run_depends = $$unique($$list($$replace(QT_PRIVATE, -private$, )))"
|
|
|
|
else: \
|
|
|
|
module_rundep =
|
2013-01-28 20:07:14 +00:00
|
|
|
static: \
|
|
|
|
module_build_type = "QT.$${MODULE}.module_config = staticlib"
|
|
|
|
else:mac:contains(QT_CONFIG, qt_framework): \
|
|
|
|
module_build_type = "QT.$${MODULE}.module_config = lib_bundle"
|
|
|
|
else: \
|
|
|
|
module_build_type =
|
|
|
|
!isEmpty(MODULE_CONFIG): \
|
|
|
|
module_config = "QT.$${MODULE}.CONFIG = $$MODULE_CONFIG"
|
|
|
|
else: \
|
|
|
|
module_config =
|
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
|
|
|
}
|
2013-06-04 18:34:49 +00:00
|
|
|
!git_build:if(!equals(_PRO_FILE_PWD_, $$OUT_PWD) \
|
|
|
|
|if(!prefix_build:!equals(MODULE_BASE_DIR, $$[QT_HOST_PREFIX]))) {
|
2013-05-28 19:34:05 +00:00
|
|
|
pub_inc = $$replace(MODULE_INCLUDES, ^\\\$\\\$QT_MODULE_INCLUDE_BASE, $$MODULE_BASE_DIR/include)
|
|
|
|
priv_inc = $$replace(MODULE_PRIVATE_INCLUDES, ^\\\$\\\$QT_MODULE_INCLUDE_BASE, $$MODULE_BASE_DIR/include)
|
|
|
|
force_independent {
|
|
|
|
MODULE_FWD_PRI_CONT_SUFFIX = \
|
|
|
|
"QT.$${MODULE}.includes += $$pub_inc" \
|
2013-06-04 18:59:08 +00:00
|
|
|
"QT.$${MODULE}.private_includes = $$priv_inc"
|
2013-05-28 19:34:05 +00:00
|
|
|
} else {
|
|
|
|
MODULE_INCLUDES += $$pub_inc
|
2013-06-04 18:59:08 +00:00
|
|
|
MODULE_PRIVATE_INCLUDES = $$priv_inc
|
2013-05-28 19:34:05 +00:00
|
|
|
}
|
|
|
|
}
|
2013-01-28 20:07:14 +00:00
|
|
|
MODULE_PRI_CONT = \
|
|
|
|
"QT.$${MODULE}.VERSION = $${VERSION}" \
|
|
|
|
"QT.$${MODULE}.MAJOR_VERSION = $$section(VERSION, ., 0, 0)" \
|
|
|
|
"QT.$${MODULE}.MINOR_VERSION = $$section(VERSION, ., 1, 1)" \
|
|
|
|
"QT.$${MODULE}.PATCH_VERSION = $$section(VERSION, ., 2, 2)" \
|
|
|
|
"" \
|
|
|
|
"QT.$${MODULE}.name = $$TARGET" \
|
2013-05-08 13:30:56 +00:00
|
|
|
"QT.$${MODULE}.libs = $$module_libs" \
|
|
|
|
$$module_rpath \
|
|
|
|
"QT.$${MODULE}.private_includes = $$MODULE_PRIVATE_INCLUDES"
|
|
|
|
!host_build: MODULE_PRI_CONT += \
|
2013-01-28 20:07:14 +00:00
|
|
|
"QT.$${MODULE}.includes = $$MODULE_INCLUDES" \
|
2013-05-08 13:30:56 +00:00
|
|
|
"QT.$${MODULE}.bins = \$\$QT_MODULE_BIN_BASE" \
|
2013-01-28 20:07:14 +00:00
|
|
|
"QT.$${MODULE}.libexecs = \$\$QT_MODULE_LIBEXEC_BASE" \
|
|
|
|
"QT.$${MODULE}.plugins = \$\$QT_MODULE_PLUGIN_BASE" \
|
|
|
|
"QT.$${MODULE}.imports = \$\$QT_MODULE_IMPORT_BASE" \
|
2013-05-08 13:30:56 +00:00
|
|
|
"QT.$${MODULE}.qml = \$\$QT_MODULE_QML_BASE"
|
|
|
|
MODULE_PRI_CONT += \
|
2013-01-28 20:07:14 +00:00
|
|
|
"QT.$${MODULE}.depends =$$join(MODULE_DEPENDS, " ", " ")" \
|
|
|
|
$$module_privdep \
|
2013-02-01 16:30:31 +00:00
|
|
|
$$module_rundep \
|
2013-01-28 20:07:14 +00:00
|
|
|
$$module_build_type \
|
|
|
|
$$module_config \
|
|
|
|
"QT.$${MODULE}.DEFINES = $$MODULE_DEFINES" \ # assume sufficient quoting
|
|
|
|
"" \
|
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.")
|
2013-01-28 19:25:44 +00:00
|
|
|
MODULE_PRI_FILES = $$MODULE_PRI
|
2012-04-16 12:13:12 +00:00
|
|
|
|
2013-02-28 13:27:57 +00:00
|
|
|
force_independent {
|
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 = \
|
|
|
|
"QT_MODULE_BIN_BASE = $$MODULE_BASE_OUTDIR/bin" \
|
|
|
|
"QT_MODULE_INCLUDE_BASE = $$MODULE_BASE_OUTDIR/include" \
|
|
|
|
"QT_MODULE_IMPORT_BASE = $$MODULE_BASE_OUTDIR/imports" \
|
|
|
|
"QT_MODULE_QML_BASE = $$MODULE_BASE_OUTDIR/qml" \
|
|
|
|
"QT_MODULE_LIB_BASE = $$MODULE_BASE_OUTDIR/lib" \
|
2013-05-08 13:30:56 +00:00
|
|
|
"QT_MODULE_HOST_LIB_BASE = $$MODULE_BASE_OUTDIR/lib" \
|
2013-01-28 19:25:44 +00:00
|
|
|
"QT_MODULE_LIBEXEC_BASE = $$MODULE_BASE_OUTDIR/libexec" \
|
|
|
|
"QT_MODULE_PLUGIN_BASE = $$MODULE_BASE_OUTDIR/plugins" \
|
2013-05-28 19:34:05 +00:00
|
|
|
"include($$MODULE_PRI)" \
|
|
|
|
$$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
|
|
|
|
|
|
|
|
} else { # prefix_build
|
|
|
|
|
|
|
|
# This is needed for the direct include() below.
|
|
|
|
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)
|
2012-04-16 12:13:12 +00:00
|
|
|
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-10-25 21:32:09 +00:00
|
|
|
includes private_includes bins libs libexecs plugins imports qml \
|
2012-12-01 10:46:51 +00:00
|
|
|
rpath_link rpath_link_private \
|
2012-04-16 12:13:12 +00:00
|
|
|
)):defined(QT.$${MODULE}.$$var, var):cache(QT.$${MODULE}.$$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
|