summaryrefslogtreecommitdiffstats
path: root/mkspecs/features/qt_module_pris.prf
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>2016-01-08 18:45:21 +0100
committerOswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>2016-01-13 15:59:05 +0000
commitb8bee40726fc93db9a025324712de6fff6a084d5 (patch)
tree996c6910c4f77d5ccc503ec8a0ca72800b95e8c8 /mkspecs/features/qt_module_pris.prf
parentdc1f65d4cf4a758ea99effe1781f859f92f9d1fc (diff)
unbreak propagation of dependencies on private modules
most module project files define two logical modules: a public one and the corresponding private one. these are really separate modules as far as qmake is concerned (even though the private one contains just headers), and consequently have separate dependencies - QT and QT_FOR_PRIVATE. as public modules cannot depend on private ones, all private dependencies would have to go to QT_FOR_PRIVATE, and a dependency on the respective public module would have to be added to QT. this would be a bit tedious, so we have a convenience feature which allows putting private dependencies into QT, but automatically "downgrades" them to their public counterpart when creating the public module's .pri file. however, we failed to put verbatim versions of these private dependencies into the private modules, which meant that these dependencies were not pulled in transitively by the private modules' users. note that this entirely unrelated to QT_PRIVATE - this one defines the private (non-propagated) dependencies of the module's implementation, i.e., the libraries (and headers) that are not part of the link interface. there is no QT_PRIVATE_FOR_PRIVATE, because there is obviously no point in assigning the dependencies to a particular logical submodule when neither one inherits them as far as the qt module system is concerned. Change-Id: Ib056b47dde3341ef9a52ffff13efaf8ef8e6817b Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'mkspecs/features/qt_module_pris.prf')
-rw-r--r--mkspecs/features/qt_module_pris.prf6
1 files changed, 5 insertions, 1 deletions
diff --git a/mkspecs/features/qt_module_pris.prf b/mkspecs/features/qt_module_pris.prf
index e293a0a4e5..5f5639a1cf 100644
--- a/mkspecs/features/qt_module_pris.prf
+++ b/mkspecs/features/qt_module_pris.prf
@@ -104,6 +104,10 @@ MODULE_FWD_PRI = $$mod_work_pfx/qt_lib_$${MODULE_ID}.pri
write_file($$MODULE_PRI, MODULE_PRI_CONT)|error("Aborting.")
!internal_module:!no_private_module {
module_build_type += internal_module
+ private_deps = $$QT
+ private_deps -= $$MODULE_DEPENDS
+ private_deps += $$MODULE $$QT_FOR_PRIVATE
+ private_deps ~= s,-private$,_private,g
MODULE_PRIVATE_PRI_CONT = \
"QT.$${MODULE}_private.VERSION = $${VERSION}" \
"QT.$${MODULE}_private.MAJOR_VERSION = $$section(VERSION, ., 0, 0)" \
@@ -115,7 +119,7 @@ MODULE_FWD_PRI = $$mod_work_pfx/qt_lib_$${MODULE_ID}.pri
"QT.$${MODULE}_private.libs = $$module_libs" \
"QT.$${MODULE}_private.includes = $$MODULE_PRIVATE_INCLUDES" \
"QT.$${MODULE}_private.frameworks =" \
- "QT.$${MODULE}_private.depends = $$replace($$list($$MODULE $$QT_FOR_PRIVATE), -private$, _private)" \
+ "QT.$${MODULE}_private.depends = $$private_deps" \
"QT.$${MODULE}_private.module_config =$$join(module_build_type, " ", " ")"
write_file($$MODULE_PRIVATE_PRI, MODULE_PRIVATE_PRI_CONT)|error("Aborting.")
}