aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/modules/qt5.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2016-05-29 23:42:09 +0300
committerJussi Pakkanen <jpakkane@gmail.com>2016-05-29 23:42:09 +0300
commitcc055387cddd0ff57ed5087f93fa846678936cc6 (patch)
treed9044b40979d6b9dbfa8f505bd4da02e9b9e0055 /mesonbuild/modules/qt5.py
parent065dcee7f3cdd4bf548848c2f989f994f4cd9748 (diff)
downloadmeson-cc055387cddd0ff57ed5087f93fa846678936cc6.zip
meson-cc055387cddd0ff57ed5087f93fa846678936cc6.tar.gz
meson-cc055387cddd0ff57ed5087f93fa846678936cc6.tar.bz2
Can have multiple Qt resource files in a single target. Closes #572.
Diffstat (limited to 'mesonbuild/modules/qt5.py')
-rw-r--r--mesonbuild/modules/qt5.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/mesonbuild/modules/qt5.py b/mesonbuild/modules/qt5.py
index f669d77..e12d5ea 100644
--- a/mesonbuild/modules/qt5.py
+++ b/mesonbuild/modules/qt5.py
@@ -125,14 +125,18 @@ class Qt5Module():
if len(rcc_files) > 0:
rcc_kwargs = {'output' : '@BASENAME@.cpp',
'arguments' : ['@INPUT@', '-o', '@OUTPUT@']}
- rcc_gen = build.Generator([self.rcc], rcc_kwargs)
- rcc_output = build.GeneratedList(rcc_gen)
qrc_deps = []
for i in rcc_files:
qrc_deps += self.parse_qrc(state, i)
- rcc_output.extra_depends = qrc_deps
- [rcc_output.add_file(os.path.join(state.subdir, a)) for a in rcc_files]
- sources.append(rcc_output)
+ rcc_kwargs = {'input' : rcc_files,
+ 'output' : rcc_files[0] + '.cpp',
+ 'command' : [self.rcc, '-o', '@OUTPUT@', '@INPUT@'],
+ 'depend_files' : qrc_deps,
+ }
+ res_target = build.CustomTarget(rcc_files[0].replace('.', '_'),
+ state.subdir,
+ rcc_kwargs)
+ sources.append(res_target)
if len(ui_files) > 0:
ui_kwargs = {'output' : 'ui_@BASENAME@.h',
'arguments' : ['-o', '@OUTPUT@', '@INPUT@']}