From 7095a58411af4b29877202cadf26a2f8579fa2e2 Mon Sep 17 00:00:00 2001 From: Pierre Rossi Date: Thu, 13 Mar 2014 17:01:36 +0100 Subject: Also moc cpp files in gyp integration We had the logic in place to detect mocable cpp files all along, but only used it for headers. Change-Id: I00ea4e3ba081c5c7d37fe35ec78233e4961481e3 Reviewed-by: Andras Becsi --- tools/qmake/mkspecs/features/gyp_generator.prf | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'tools/qmake/mkspecs/features') diff --git a/tools/qmake/mkspecs/features/gyp_generator.prf b/tools/qmake/mkspecs/features/gyp_generator.prf index b5d69497b..0b950463e 100644 --- a/tools/qmake/mkspecs/features/gyp_generator.prf +++ b/tools/qmake/mkspecs/features/gyp_generator.prf @@ -57,7 +57,8 @@ defineReplace(rccAction) { isEmpty(GYPFILE): GYPFILE = $$replace(_PRO_FILE_, .pro$, .gyp) TARGET_TYPE = $$toGypTargetType() -MOCABLE_HEADERS = $$findMocables($$HEADERS) +MOCABLES = $$findMocables($$HEADERS) +MOCABLES += $$findMocables($$SOURCES) INCLUDED_MOC_FILES = $$findIncludedMocFiles($$SOURCES) GYP_CONTENTS = "{" \ @@ -115,9 +116,9 @@ for (resourcefile, RESOURCES) { # Add moc output files to compile that aren't included at the end of any other source MOC_OUT_PATH = $$absolute_path($$MOC_DIR, $$OUT_PWD)$${QMAKE_DIR_SEP} -for (mocable_header, MOCABLE_HEADERS) { - !contains(INCLUDED_MOC_FILES, $$mocOutput($$mocable_header)) { - GYP_CONTENTS += " '$$MOC_OUT_PATH$$mocOutput($$mocable_header)'," +for (mocable, MOCABLES) { + !contains(INCLUDED_MOC_FILES, $$mocOutput($$mocable)) { + GYP_CONTENTS += " '$$MOC_OUT_PATH$$mocOutput($$mocable)'," } } @@ -131,7 +132,7 @@ GYP_CONTENTS += " ]," # Generate the actions for moc and rcc GYP_CONTENTS += " 'actions': [" for(resourcefile, RESOURCES): GYP_CONTENTS += $$rccAction($$resourcefile) -for(header, MOCABLE_HEADERS): GYP_CONTENTS += $$mocAction($$header) +for(mocable, MOCABLES): GYP_CONTENTS += $$mocAction($$mocable) GYP_CONTENTS += " ]," \ " }," -- cgit v1.2.3