support for private depends in modules
if a module's private headers add additional dependencies, QT_PRIVATE is now the place to declare them. note however, that this may not contain other private headers in turn - that would be much harder to implement, and we want the explicitness anyway. Change-Id: Ic516fcf1a003c95798df4fbe216f92016afaf47e Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
This commit is contained in:
parent
5290f6df89
commit
e6d97f3f77
@ -146,6 +146,7 @@ for(QTLIB, QT) {
|
|||||||
want_var = QT.$${QTLIBRAW}.want_private
|
want_var = QT.$${QTLIBRAW}.want_private
|
||||||
$$want_var = UsePrivate
|
$$want_var = UsePrivate
|
||||||
using_privates = true
|
using_privates = true
|
||||||
|
NEWQT += $$eval(QT.$${QTLIBRAW}.private_depends)
|
||||||
}
|
}
|
||||||
NEWQT += $$QTLIBRAW
|
NEWQT += $$QTLIBRAW
|
||||||
}
|
}
|
||||||
|
@ -42,6 +42,12 @@ MODULE_PRI = $$MODULE_QMAKE_OUTDIR/mkspecs/modules-inst/qt_$${MODULE}.pri
|
|||||||
!build_pass {
|
!build_pass {
|
||||||
|
|
||||||
# Create a module .pri file
|
# Create a module .pri file
|
||||||
|
!isEmpty(QT_PRIVATE) {
|
||||||
|
contains(QT_PRIVATE, .*-private$):error("QT_PRIVATE may not contain *-private.")
|
||||||
|
module_privdep = "QT.$${MODULE}.private_depends = $$QT_PRIVATE"
|
||||||
|
} else {
|
||||||
|
module_privdep =
|
||||||
|
}
|
||||||
staticlib: \
|
staticlib: \
|
||||||
module_build_type = "QT.$${MODULE}.module_config = staticlib"
|
module_build_type = "QT.$${MODULE}.module_config = staticlib"
|
||||||
else:mac:!static:contains(QT_CONFIG, qt_framework): \
|
else:mac:!static:contains(QT_CONFIG, qt_framework): \
|
||||||
@ -72,6 +78,7 @@ MODULE_PRI = $$MODULE_QMAKE_OUTDIR/mkspecs/modules-inst/qt_$${MODULE}.pri
|
|||||||
"QT.$${MODULE}.plugins = \$\$QT_MODULE_PLUGIN_BASE" \
|
"QT.$${MODULE}.plugins = \$\$QT_MODULE_PLUGIN_BASE" \
|
||||||
"QT.$${MODULE}.imports = \$\$QT_MODULE_IMPORT_BASE" \
|
"QT.$${MODULE}.imports = \$\$QT_MODULE_IMPORT_BASE" \
|
||||||
"QT.$${MODULE}.depends =$$join(MODULE_DEPENDS, " ", " ")" \
|
"QT.$${MODULE}.depends =$$join(MODULE_DEPENDS, " ", " ")" \
|
||||||
|
$$module_privdep \
|
||||||
$$module_build_type \
|
$$module_build_type \
|
||||||
$$module_config \
|
$$module_config \
|
||||||
"QT.$${MODULE}.DEFINES = $$MODULE_DEFINES" \ # assume sufficient quoting
|
"QT.$${MODULE}.DEFINES = $$MODULE_DEFINES" \ # assume sufficient quoting
|
||||||
@ -110,6 +117,9 @@ if(win32|mac):!wince*:!macx-xcode {
|
|||||||
|
|
||||||
linux*:QMAKE_LFLAGS += $$QMAKE_LFLAGS_NOUNDEF
|
linux*:QMAKE_LFLAGS += $$QMAKE_LFLAGS_NOUNDEF
|
||||||
|
|
||||||
|
QT += $$QT_PRIVATE
|
||||||
|
unset(QT_PRIVATE)
|
||||||
|
|
||||||
!isEmpty(DESTDIR):CONFIG += create_cmake
|
!isEmpty(DESTDIR):CONFIG += create_cmake
|
||||||
|
|
||||||
contains(TARGET, QtAddOn.*): \
|
contains(TARGET, QtAddOn.*): \
|
||||||
|
@ -41,7 +41,7 @@
|
|||||||
}
|
}
|
||||||
include($$MODULE_FWD_PRI)
|
include($$MODULE_FWD_PRI)
|
||||||
for(var, $$list(VERSION MAJOR_VERSION MINOR_VERSION PATCH_VERSION \
|
for(var, $$list(VERSION MAJOR_VERSION MINOR_VERSION PATCH_VERSION \
|
||||||
name depends module_config CONFIG DEFINES sources \
|
name depends private_depends module_config CONFIG DEFINES sources \
|
||||||
includes private_includes bins libs plugins imports \
|
includes private_includes bins libs plugins imports \
|
||||||
)):defined(QT.$${MODULE}.$$var, var):cache(QT.$${MODULE}.$$var, transient)
|
)):defined(QT.$${MODULE}.$$var, var):cache(QT.$${MODULE}.$$var, transient)
|
||||||
cache(QT_CONFIG, transient)
|
cache(QT_CONFIG, transient)
|
||||||
|
Loading…
Reference in New Issue
Block a user