summaryrefslogtreecommitdiffstats
path: root/mkspecs/features/qt_module_config.prf
diff options
context:
space:
mode:
Diffstat (limited to 'mkspecs/features/qt_module_config.prf')
-rw-r--r--mkspecs/features/qt_module_config.prf10
1 files changed, 9 insertions, 1 deletions
diff --git a/mkspecs/features/qt_module_config.prf b/mkspecs/features/qt_module_config.prf
index 55c578fb8d..8f225fe6ed 100644
--- a/mkspecs/features/qt_module_config.prf
+++ b/mkspecs/features/qt_module_config.prf
@@ -1,4 +1,12 @@
-load(qt_module)
+!no_qt_module_warning:if(!contains(QMAKE_INTERNAL_INCLUDED_FILES, .*qmodule\\\\.pri)|isEmpty(QMAKE_QT_MODULE_PRI_LOADED)) {
+ QMAKE_ACTUAL_PRO_FILE = $$basename(_PRO_FILE_)
+ isEmpty(QMAKE_ACTUAL_PRO_FILE): QMAKE_ACTUAL_PRO_FILE=.pro
+ warning("You should probably load(qt_module) first in $$QMAKE_ACTUAL_PRO_FILE for $$TARGET, as it also load()s qt_module_config.")
+ message("Not doing so may lead to qt_module_config.prf overriding compiler/linker options in your .pro file.")
+ message("Ignore this warning with CONFIG+=no_qt_module_warning if you know what you are doing.")
+ unset(QMAKE_ACTUAL_PRO_FILE)
+}
+load(qt_module) # loads qmodule.pri if hasn't been loaded already
isEmpty(MODULE):MODULE = $$section($$list($$basename(_PRO_FILE_)), ., 0, 0)
isEmpty(TARGET):error("You must set TARGET before include()'ing $${_FILE_}")