Help automoc to find metadata JSON files referenced in the code

Authored by kossebau on Feb 21 2018, 6:24 PM.

Description

Help automoc to find metadata JSON files referenced in the code

Summary:
automoc by itself can only detect metadata files referenced by direct
usage of the Q_PLUGIN_METADATA macro. It does not do any C++ preprocessor
evaluation. Instead it needs to be helped with regexp-based filter rules
for detecting any names of files used as additional moc input.
See docs for AUTOMOC_DEPEND_FILTERS for further details.

In the near future all the boilerplate code should be replaced with a yet to
be designed ECM macro. For now explicit code is used to collect use cases
for the macro and still to fix the issue already.

Test Plan:
Changing a JSON file (or for those generated from .desktop files
changing that one) and running make results in the related *.moc file
being regenerated and the related object file being recompiled.
qtplugininfo shows that the created plugin binary has up-to-date JSON
content.

Reviewers: Frameworks, Build System, apol

Reviewed By: apol

Tags: Frameworks

Differential Revision: https://phabricator.kde.org/D10724

Details

Committed
kossebauFeb 22 2018, 10:14 PM
Reviewer
apol
Differential Revision
D10724: Help automoc to find metadata JSON files referenced in the code
Parents
R244:10f40905829c: GIT_SILENT made messages (after extraction)
Branches
Unknown
Tags
Unknown