From 76d88259bde4e8d28d18c66c171fa6625d129a79 Mon Sep 17 00:00:00 2001 From: Jussi Pakkanen Date: Mon, 30 May 2016 00:22:39 +0300 Subject: [PATCH] Make sure outputs do not contain stray path segments. --- mesonbuild/modules/qt5.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/mesonbuild/modules/qt5.py b/mesonbuild/modules/qt5.py index e12d5ea03..4f19b78f6 100644 --- a/mesonbuild/modules/qt5.py +++ b/mesonbuild/modules/qt5.py @@ -123,17 +123,16 @@ class Qt5Module(): srctmp = [srctmp] sources = args[1:] + srctmp if len(rcc_files) > 0: - rcc_kwargs = {'output' : '@BASENAME@.cpp', - 'arguments' : ['@INPUT@', '-o', '@OUTPUT@']} qrc_deps = [] for i in rcc_files: qrc_deps += self.parse_qrc(state, i) + basename = os.path.split(rcc_files[0])[1] rcc_kwargs = {'input' : rcc_files, - 'output' : rcc_files[0] + '.cpp', + 'output' : basename + '.cpp', 'command' : [self.rcc, '-o', '@OUTPUT@', '@INPUT@'], 'depend_files' : qrc_deps, } - res_target = build.CustomTarget(rcc_files[0].replace('.', '_'), + res_target = build.CustomTarget(basename.replace('.', '_'), state.subdir, rcc_kwargs) sources.append(res_target)