diff options
| author | Jussi Pakkanen <jpakkane@gmail.com> | 2014-05-12 22:16:30 +0300 |
|---|---|---|
| committer | Jussi Pakkanen <jpakkane@gmail.com> | 2014-05-12 22:16:30 +0300 |
| commit | b5060807f74f376fac68a8911301fc54e2162260 (patch) | |
| tree | 1521ec1b23b2fc760fd918be9d1a397dd632994e | |
| parent | cbe19a07b0222958c80961483d1833f087682ea0 (diff) | |
| download | meson-b5060807f74f376fac68a8911301fc54e2162260.tar.gz | |
Put build dir in moc search path.
| -rw-r--r-- | dependencies.py | 4 | ||||
| -rw-r--r-- | ninjabackend.py | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/dependencies.py b/dependencies.py index eabdb7136..71594572b 100644 --- a/dependencies.py +++ b/dependencies.py @@ -529,10 +529,10 @@ class Qt5Dependency(Dependency): return True def get_generate_rules(self): - moc_rule = CustomRule([self.moc.get_command(), '@INFILE@', '-o', '@OUTFILE@'], + moc_rule = CustomRule([self.moc.get_command(), '$mocflags', '@INFILE@', '-o', '@OUTFILE@'], 'moc_@BASENAME@.cpp', 'moc_headers', 'moc_hdr_compile', 'Compiling header @INFILE@ with the moc preprocessor') - mocsrc_rule = CustomRule([self.moc.get_command(), '@INFILE@', '-o', '@OUTFILE@'], + mocsrc_rule = CustomRule([self.moc.get_command(), '$mocflags', '@INFILE@', '-o', '@OUTFILE@'], '@BASENAME@.moc', 'moc_sources', 'moc_src_compile', 'Compiling source @INFILE@ with the moc preprocessor') ui_rule = CustomRule([self.uic.get_command(), '@INFILE@', '-o', '@OUTFILE@'], diff --git a/ninjabackend.py b/ninjabackend.py index 82693040a..48dfaf16b 100644 --- a/ninjabackend.py +++ b/ninjabackend.py @@ -883,6 +883,8 @@ class NinjaBackend(backends.Backend): elem = NinjaBuildElement(outfilename, rule.name, infilename) if rule.name == 'rc_compile': elem.add_item('rcc_flags', ['--name', basename]) + if rule.name == 'moc_hdr_compile' or rule.name == 'moc_src_compile': + elem.add_item('mocflags', ['-I', target.subdir]) elem.write(outfile) if self.is_compilable_file(outfilename): if rule.name == 'moc_hdr_compile' or rule.name == 'moc_src_compile': |
