From 49df5fc3d22669e8c534fc9985e9f4e09f8b2f62 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Sat, 1 Feb 2014 17:26:33 -0800 Subject: Fix compilation when including files created in shadow dirs For normal #includes, moc simply ignores the missing file, but it could generate problems later. It's a problem when the file being sought is the FILE from plugin metadata. A very good example of this is Qt Creator: coreplugin.h:49: Error: Plugin Metadata file "Core.json" does not exist. Change-Id: I16af04b477f52c6bd53c14147ec777b358dfdf50 Reviewed-by: Oswald Buddenhagen --- mkspecs/features/moc.prf | 2 ++ 1 file changed, 2 insertions(+) (limited to 'mkspecs') diff --git a/mkspecs/features/moc.prf b/mkspecs/features/moc.prf index 100edc2d98..c0b5682446 100644 --- a/mkspecs/features/moc.prf +++ b/mkspecs/features/moc.prf @@ -8,6 +8,8 @@ isEmpty(QMAKE_EXT_CPP_MOC):QMAKE_EXT_CPP_MOC = .moc MOC_INCLUDEPATH = for (inc, INCLUDEPATH): \ MOC_INCLUDEPATH += $$absolute_path($$inc, $$_PRO_FILE_PWD_) +!no_include_pwd:!isEqual(OUT_PWD, $$_PRO_FILE_PWD_): \ + MOC_INCLUDEPATH += . MOC_INCLUDEPATH = $$QMAKESPEC $$_PRO_FILE_PWD_ $$MOC_INCLUDEPATH $$QMAKE_DEFAULT_INCDIRS # On Windows, put the includes into a .inc file which moc will read, if the project -- cgit v1.2.3