Qt-Module: fix name option with multiple rcc files

Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
pull/2579/head
Markus Theil 7 years ago
parent b36475ff44
commit 3f8a082a68
  1. 12
      mesonbuild/modules/qt.py

@ -101,12 +101,20 @@ class QtBaseModule:
qrc_deps = []
for i in rcc_files:
qrc_deps += self.parse_qrc(state, i)
# custom output name set? -> one output file, multiple otherwise
if len(args) > 0:
name = args[0]
rcc_kwargs = {'input': rcc_files,
'output': name + '.cpp',
'command': [self.rcc, '-name', name, '-o', '@OUTPUT@', '@INPUT@'],
'depend_files': qrc_deps}
res_target = build.CustomTarget(name, state.subdir, state.subproject, rcc_kwargs)
sources.append(res_target)
else:
basename = os.path.split(rcc_files[0])[1]
for rcc_file in rcc_files:
basename = os.path.split(rcc_file)[1]
name = 'qt' + str(self.qt_version) + '-' + basename.replace('.', '_')
rcc_kwargs = {'input': rcc_files,
rcc_kwargs = {'input': rcc_file,
'output': name + '.cpp',
'command': [self.rcc, '-name', '@BASENAME@', '-o', '@OUTPUT@', '@INPUT@'],
'depend_files': qrc_deps}

Loading…
Cancel
Save