summaryrefslogtreecommitdiffstats
path: root/mkspecs
diff options
context:
space:
mode:
Diffstat (limited to 'mkspecs')
-rw-r--r--mkspecs/features/designer.prf2
-rw-r--r--mkspecs/features/help.prf2
-rw-r--r--mkspecs/features/module.prf7
-rw-r--r--mkspecs/features/qt.prf18
-rw-r--r--mkspecs/features/qt_config.prf2
-rw-r--r--mkspecs/features/qt_functions.prf24
6 files changed, 46 insertions, 9 deletions
diff --git a/mkspecs/features/designer.prf b/mkspecs/features/designer.prf
index fa40caab3f..63a7e76a34 100644
--- a/mkspecs/features/designer.prf
+++ b/mkspecs/features/designer.prf
@@ -4,4 +4,4 @@ qt:load(qt)
plugin:DEFINES += QDESIGNER_EXPORT_WIDGETS
-qtAddLibrary(QtDesigner)
+qtAddLibrary(QtDesigner, true)
diff --git a/mkspecs/features/help.prf b/mkspecs/features/help.prf
index d8ba8c3537..c96ecae8fe 100644
--- a/mkspecs/features/help.prf
+++ b/mkspecs/features/help.prf
@@ -1,3 +1,3 @@
QT += xml sql
-qtAddModule(help)
+qtAddModule(help, true)
diff --git a/mkspecs/features/module.prf b/mkspecs/features/module.prf
new file mode 100644
index 0000000000..248f7f516a
--- /dev/null
+++ b/mkspecs/features/module.prf
@@ -0,0 +1,7 @@
+!isEmpty(MODULE_PRI) {
+ pritarget.path = $$[QT_INSTALL_DATA]/mkspecs/modules
+ pritarget.files = $$MODULE_PRI
+ INSTALLS = pritarget
+} else {
+ warning("Project $$basename(_PRO_FILE_) is a module, but has not defined MODULE_PRI, which is required for Qt to expose the module to other projects")
+}
diff --git a/mkspecs/features/qt.prf b/mkspecs/features/qt.prf
index e30a2fdd27..c611096147 100644
--- a/mkspecs/features/qt.prf
+++ b/mkspecs/features/qt.prf
@@ -134,7 +134,16 @@ QT = $$resolve_depends($$QT, "QT.")
QT_DEPENDS=
+unset(using_privates)
for(QTLIB, $$list($$lower($$unique(QT)))) {
+ # Figure out if we're wanting to use the private headers of a module
+ contains(QTLIB, .*-private) {
+ QTLIB ~= s/-private//
+ use_private = UsePrivate
+ } else {
+ use_private = NoPrivate
+ }
+
isEmpty(QT.$${QTLIB}.name) {
message("Warning: unknown QT module: $$QTLIB")
next()
@@ -144,14 +153,21 @@ for(QTLIB, $$list($$lower($$unique(QT)))) {
warning($$TARGET cannot have a QT of $$QTLIB)
next()
}
- qtAddModule($$QTLIB)
+ qtAddModule($$QTLIB, $$use_private)
QT_DEPENDS += $$eval(QT.$${QTLIB}.depends)
+ isEqual(use_private, UsePrivate):using_privates = true
}
# add include paths for all .depends, since module/application might need f.ex. template specializations etc.
QT_DEPENDS -= $$QT
for(QTLIB, $$list($$lower($$unique(QT_DEPENDS)))):INCLUDEPATH += $$INCLUDEPATH $$eval(QT.$${QTLIB}.includes)
+!isEmpty(using_privates):!no_private_qt_headers_warning:if(!debug_and_release|!build_pass) {
+ message("This project is using private headers and will therefore be tied to this specific Qt module build version.")
+ message("Running this project against other versions of the Qt modules may crash at any arbitrary point.")
+ message("This is not a bug, but a result of using Qt internals. You have been warned!")
+}
+
qt_compat {
!qt_compat_no_warning:QTDIR_build:warning(***USE of COMPAT inside of QTDIR!**) #just for us
INCLUDEPATH *= $$QMAKE_INCDIR_QT/Qt
diff --git a/mkspecs/features/qt_config.prf b/mkspecs/features/qt_config.prf
index 5afd82c84a..071bb6c237 100644
--- a/mkspecs/features/qt_config.prf
+++ b/mkspecs/features/qt_config.prf
@@ -12,7 +12,7 @@ isEmpty(QMAKE_QT_CONFIG)|!exists($$QMAKE_QT_CONFIG) {
} else {
debug(1, "Loaded .qconfig.pri from ($$QMAKE_QT_CONFIG)")
for(dir, $$list($$unique($$list($$dirname(QMAKE_QT_CONFIG) \
- $$split($$list($$[QMAKE_MKSPECS]), $$DIRLIST_SEPARATOR))))) {
+ $$replace($$list($$split($$list($$(QMAKEPATH)), $$DIRLIST_SEPARATOR)), $, /mkspecs))))) {
debug(1, "Loading modules from $${dir}")
for(mod, $$list($$files($$dir/modules/qt_*.pri))) {
# For installed Qt these paths will be common for all modules
diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf
index b16c84864f..50a85d86ce 100644
--- a/mkspecs/features/qt_functions.prf
+++ b/mkspecs/features/qt_functions.prf
@@ -102,6 +102,16 @@ defineTest(qtAddModule) {
INCLUDEPATH -= $$MODULE_INCLUDES
INCLUDEPATH = $$MODULE_INCLUDES $$INCLUDEPATH
+ isEqual(2, UsePrivate) { # Tests function parameter 2 ($$2) being equal to 'UsePrivate'
+ # This adds both
+ # <module privates include path>/
+ # and <module privates include path>/<module name>
+ # since we have code using both #include <QtCore/private/foo> and #include <private/foo>
+ # Both need to be supported with the new private includes structure
+ MODULE_INCLUDES_PRIVATES = $$eval(QT.$${1}.private_includes)
+ INCLUDEPATH -= $$MODULE_INCLUDES_PRIVATES $$MODULE_INCLUDES_PRIVATES/$$MODULE_NAME
+ INCLUDEPATH = $$MODULE_INCLUDES_PRIVATES $$MODULE_INCLUDES_PRIVATES/$$MODULE_NAME $$INCLUDEPATH
+ }
unset(LINKAGE)
mac {
@@ -140,12 +150,16 @@ defineTest(qtAddModule) {
}
isEmpty(LINKAGE):LINKAGE = -l$${MODULE_NAME}$${QT_LIBINFIX}
}
- !isEmpty(QMAKE_LSB) {
- QMAKE_LFLAGS *= --lsb-libpath=$$$$QMAKE_LIBDIR_QT
- QMAKE_LFLAGS *= -L/opt/lsb/lib
- QMAKE_LFLAGS *= --lsb-shared-libs=$${MODULE_NAME}$${QT_LIBINFIX}
+ # Only link to this module if a libs directory is set, else this is just a module
+ # to give access to sources or include files, and not for linking.
+ !isEmpty(MODULE_LIBS) {
+ !isEmpty(QMAKE_LSB) {
+ QMAKE_LFLAGS *= --lsb-libpath=$$$$QMAKE_LIBDIR_QT
+ QMAKE_LFLAGS *= -L/opt/lsb/lib
+ QMAKE_LFLAGS *= --lsb-shared-libs=$${MODULE_NAME}$${QT_LIBINFIX}
+ }
+ LIBS += $$LINKAGE
}
- LIBS += $$LINKAGE
export(CONFIG)
export(DEFINES)
export(LIBS)