diff options
-rw-r--r-- | dependencies.py | 6 | ||||
-rw-r--r-- | ninjabackend.py | 2 | ||||
-rw-r--r-- | test cases/frameworks/4 qt5/main.cpp | 4 | ||||
-rw-r--r-- | test cases/frameworks/4 qt5/meson.build | 2 | ||||
-rw-r--r-- | test cases/frameworks/4 qt5/stuff2.qrc | 5 | ||||
-rw-r--r-- | test cases/frameworks/4 qt5/thing2.png | bin | 0 -> 40303 bytes |
6 files changed, 15 insertions, 4 deletions
diff --git a/dependencies.py b/dependencies.py index 47bd1c0..1e10978 100644 --- a/dependencies.py +++ b/dependencies.py @@ -524,9 +524,9 @@ class Qt5Dependency(Dependency): ui_rule = CustomRule([self.uic.get_command(), '@INFILE@', '-o', '@OUTFILE@'], 'ui_@BASENAME@.h', 'ui_files', 'ui_compile', 'Compiling @INFILE@ with the ui compiler') - rrc_rule = CustomRule([self.rcc.get_command(), '@INFILE@', '-o', '@OUTFILE@'], - '@BASENAME@.cpp', 'qresources', 'rc_compile', - 'Compiling @INFILE@ with the rrc compiler') + rrc_rule = CustomRule([self.rcc.get_command(), '@INFILE@', '-o', '@OUTFILE@', + '${rcc_flags}'], '@BASENAME@.cpp','qresources', + 'rc_compile', 'Compiling @INFILE@ with the rrc compiler') return [moc_rule, mocsrc_rule, ui_rule, rrc_rule] def get_exe_flags(self): diff --git a/ninjabackend.py b/ninjabackend.py index eb4c579..f692aba 100644 --- a/ninjabackend.py +++ b/ninjabackend.py @@ -809,6 +809,8 @@ class NinjaBackend(backends.Backend): outfilename = os.path.join(self.get_target_private_dir(target), outname) infilename = os.path.join(self.build_to_src, target.get_source_subdir(), src) elem = NinjaBuildElement(outfilename, rule.name, infilename) + if rule.name == 'rc_compile': + elem.add_item('rcc_flags', ['--name', basename]) elem.write(outfile) if self.is_compilable_file(outfilename): if rule.name == 'moc_hdr_compile': diff --git a/test cases/frameworks/4 qt5/main.cpp b/test cases/frameworks/4 qt5/main.cpp index 41d7d70..4c257a4 100644 --- a/test cases/frameworks/4 qt5/main.cpp +++ b/test cases/frameworks/4 qt5/main.cpp @@ -8,6 +8,10 @@ int main(int argc, char **argv) { if(qi.width() != 640) { return 1; } + QImage qi2(":/thing2.png"); + if(qi2.width() != 640) { + return 1; + } win->setWindowTitle("Meson Qt5 build test"); win->show(); diff --git a/test cases/frameworks/4 qt5/meson.build b/test cases/frameworks/4 qt5/meson.build index 237db33..2eefafd 100644 --- a/test cases/frameworks/4 qt5/meson.build +++ b/test cases/frameworks/4 qt5/meson.build @@ -6,7 +6,7 @@ q5exe = executable('qt5app', sources : ['main.cpp', 'mainWindow.cpp'], # Sources that don't need preprocessing. moc_headers : ['mainWindow.h'], # These need to be fed through the moc tool before use. ui_files : 'mainWindow.ui', # XML files that need to be compiled with the uic tol. -qresources : 'stuff.qrc', # Resource file for rcc compiler. +qresources : ['stuff.qrc', 'stuff2.qrc'], # Resource files for rcc compiler. deps : qt5dep) # We need a console test application because some test environments diff --git a/test cases/frameworks/4 qt5/stuff2.qrc b/test cases/frameworks/4 qt5/stuff2.qrc new file mode 100644 index 0000000..b719919 --- /dev/null +++ b/test cases/frameworks/4 qt5/stuff2.qrc @@ -0,0 +1,5 @@ +<!DOCTYPE RCC><RCC version="1.0"> +<qresource> + <file>thing2.png</file> +</qresource> +</RCC> diff --git a/test cases/frameworks/4 qt5/thing2.png b/test cases/frameworks/4 qt5/thing2.png Binary files differnew file mode 100644 index 0000000..4b001bd --- /dev/null +++ b/test cases/frameworks/4 qt5/thing2.png |