summaryrefslogtreecommitdiffstats
path: root/mkspecs/features/qt_module_pris.prf
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>2015-11-19 17:11:05 +0100
committerOswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>2016-01-13 15:59:00 +0000
commitdc1f65d4cf4a758ea99effe1781f859f92f9d1fc (patch)
tree2cf40ba8310eaa288b8ed789b1f1b6e38fed05fe /mkspecs/features/qt_module_pris.prf
parentcd9625fc3cacb4efd0da57d9f5780671f5c1310f (diff)
make module .pri files more flexible
save the actual library/framework name and framework paths in the .pri file instead of computing them again at use time in qt.prf. qt_no_framework_direct_includes inherently requires a use-time decision, so this ugliness remains. Change-Id: I09b2775e7d8e1d52e3af0d663e1babde10ae4814 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Diffstat (limited to 'mkspecs/features/qt_module_pris.prf')
-rw-r--r--mkspecs/features/qt_module_pris.prf30
1 files changed, 19 insertions, 11 deletions
diff --git a/mkspecs/features/qt_module_pris.prf b/mkspecs/features/qt_module_pris.prf
index fdcb9df270..e293a0a4e5 100644
--- a/mkspecs/features/qt_module_pris.prf
+++ b/mkspecs/features/qt_module_pris.prf
@@ -46,18 +46,22 @@ MODULE_FWD_PRI = $$mod_work_pfx/qt_lib_$${MODULE_ID}.pri
module_rundep = "QT.$${MODULE_ID}.run_depends = $$replace(QT_PRIVATE, -private$, _private)"
else: \
module_rundep =
+ module_build_type = v2
static: \
- module_build_type = staticlib
- else: lib_bundle: \
- module_build_type = lib_bundle
- else: \
- module_build_type =
- equals(TEMPLATE, aux): \
- module_build_type += no_link
+ module_build_type += staticlib
+ lib_bundle {
+ module_build_type += lib_bundle
+ MODULE_FRAMEWORKS = " \$\$QT_MODULE_LIB_BASE"
+ }
internal_module: \
module_build_type += internal_module
ltcg: \
module_build_type += ltcg
+ module_module =
+ !equals(TEMPLATE, aux) {
+ module_module = $$TARGET$$QT_LIBINFIX
+ !lib_bundle: module_module ~= s,^Qt,Qt$$QT_MAJOR_VERSION,
+ }
!isEmpty(MODULE_CONFIG): \
module_config = "QT.$${MODULE_ID}.CONFIG = $$MODULE_CONFIG"
else: \
@@ -77,9 +81,11 @@ MODULE_FWD_PRI = $$mod_work_pfx/qt_lib_$${MODULE_ID}.pri
"QT.$${MODULE_ID}.PATCH_VERSION = $$section(VERSION, ., 2, 2)" \
"" \
"QT.$${MODULE_ID}.name = $$TARGET" \
+ "QT.$${MODULE_ID}.module = $$module_module" \
"QT.$${MODULE_ID}.libs = $$module_libs" \
$$module_master \
- "QT.$${MODULE_ID}.includes = $$MODULE_INCLUDES"
+ "QT.$${MODULE_ID}.includes = $$MODULE_INCLUDES" \
+ "QT.$${MODULE_ID}.frameworks =$$MODULE_FRAMEWORKS"
!host_build: MODULE_PRI_CONT += \
"QT.$${MODULE_ID}.bins = \$\$QT_MODULE_BIN_BASE" \
"QT.$${MODULE_ID}.libexecs = \$\$QT_MODULE_LIBEXEC_BASE" \
@@ -97,7 +103,7 @@ MODULE_FWD_PRI = $$mod_work_pfx/qt_lib_$${MODULE_ID}.pri
"QT_MODULES += $$MODULE"
write_file($$MODULE_PRI, MODULE_PRI_CONT)|error("Aborting.")
!internal_module:!no_private_module {
- module_build_type += internal_module no_link
+ module_build_type += internal_module
MODULE_PRIVATE_PRI_CONT = \
"QT.$${MODULE}_private.VERSION = $${VERSION}" \
"QT.$${MODULE}_private.MAJOR_VERSION = $$section(VERSION, ., 0, 0)" \
@@ -105,8 +111,10 @@ MODULE_FWD_PRI = $$mod_work_pfx/qt_lib_$${MODULE_ID}.pri
"QT.$${MODULE}_private.PATCH_VERSION = $$section(VERSION, ., 2, 2)" \
"" \
"QT.$${MODULE}_private.name = $${TARGET}" \ # Same name as base module
+ "QT.$${MODULE}_private.module =" \
"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.module_config =$$join(module_build_type, " ", " ")"
write_file($$MODULE_PRIVATE_PRI, MODULE_PRIVATE_PRI_CONT)|error("Aborting.")
@@ -169,8 +177,8 @@ MODULE_FWD_PRI = $$mod_work_pfx/qt_lib_$${MODULE_ID}.pri
include($$mod_work_pfx/qt_lib_$${pri}.pri)
for(mod, mods_to_load) {
for(var, $$list(VERSION MAJOR_VERSION MINOR_VERSION PATCH_VERSION \
- name depends run_depends plugin_types module_config CONFIG DEFINES \
- priority includes bins libs libexecs plugins imports qml \
+ name module depends run_depends plugin_types module_config CONFIG DEFINES \
+ priority includes bins libs frameworks libexecs plugins imports qml \
)):defined(QT.$${mod}.$$var, var):cache(QT.$${mod}.$$var, transient)
}
cache(QT_MODULES, transient)