summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@qt.io>2018-06-22 16:48:58 +0200
committerKai Koehne <kai.koehne@qt.io>2018-06-25 07:20:46 +0000
commit4c68e2558c8b90f301032f2e29130e6ac509dc21 (patch)
treec8195f89109e216fb35dccfd00d26a76101f773f
parent0e88882fee659f8720c63e067be734e5247af90f (diff)
Fix moc warnings with no_include_pwd and shadow builds
If CONFIG option no_include_pwd is set, moc does not add the build directory to its include path. The path to the generated moc_predefs.h file is by default relative though, resulting in moc warnings: Warning: Failed to resolve include "debug/moc_predefs.h" for moc file xxx myheader.h Fix this by always making the path to moc_predefs.h absolute. Task-number: QTBUG-69087 Change-Id: I8ef79c8340f9ebd6b0bba15e026d65ef3c088535 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
-rw-r--r--mkspecs/features/moc.prf2
1 files changed, 1 insertions, 1 deletions
diff --git a/mkspecs/features/moc.prf b/mkspecs/features/moc.prf
index 37194b2eb8..5c7745e5bb 100644
--- a/mkspecs/features/moc.prf
+++ b/mkspecs/features/moc.prf
@@ -57,7 +57,7 @@ defineReplace(mocCmdBase) {
msvc: RET += --compiler-flavor=msvc
isEmpty(MOC_PREDEF_FILE): RET += $$join(QMAKE_COMPILER_DEFINES, " -D", -D)
- else: RET += --include $$shell_quote($$moc_predefs.output)
+ else: RET += --include $$shell_quote($$absolute_path($$moc_predefs.output, $$OUT_PWD))
RET += $$incvar $$QMAKE_MOC_OPTIONS
return($$RET)