diff options
author | Pierre Rossi <pierre.rossi@digia.com> | 2014-03-13 17:01:36 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-05-22 18:42:17 +0200 |
commit | 7095a58411af4b29877202cadf26a2f8579fa2e2 (patch) | |
tree | 85b70aaf701315c86460703c66abba4e255d7b10 /tools/qmake | |
parent | 29fd3d8d64271fef58fb296ef31675fe624782d0 (diff) |
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 <andras.becsi@digia.com>
Diffstat (limited to 'tools/qmake')
-rw-r--r-- | tools/qmake/mkspecs/features/gyp_generator.prf | 11 |
1 files changed, 6 insertions, 5 deletions
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 += " ]," \ " }," |