Added failing test case

When having Qt resources in a meson subdir, meson prepends twice
the subdir name in resource file dependencies.
Here it will set 'subfolder/subfolder/resources/thing.png' as dependencie
for stuff3.qrc.

Signed-off-by: Alexis Jeandet <alexis.jeandet@member.fsf.org>
pull/2956/head
Alexis Jeandet 7 years ago
parent bdfcecd2c6
commit 4e6630690a
  1. 3
      test cases/frameworks/4 qt/meson.build
  2. 10
      test cases/frameworks/4 qt/subfolder/main.cpp
  3. 4
      test cases/frameworks/4 qt/subfolder/meson.build
  4. 6
      test cases/frameworks/4 qt/subfolder/resources/stuff3.qrc
  5. BIN
      test cases/frameworks/4 qt/subfolder/resources/thing.png

@ -92,5 +92,8 @@ foreach qt : ['qt4', 'qt5']
plugin = library(qt + 'plugin', 'plugin/plugin.cpp', pluginpreprocess,
include_directories : plugin_includes,
dependencies : qtcore)
if qt == 'qt5'
subdir('subfolder')
endif
endif
endforeach

@ -0,0 +1,10 @@
#include <QImage>
int main(int argc, char **argv) {
Q_INIT_RESOURCE(stuff3);
QImage qi(":/thing.png");
if(qi.width() != 640) {
return 1;
}
return 0;
}

@ -0,0 +1,4 @@
qresources = qtmodule.preprocess(qresources : 'resources/stuff3.qrc')
app = executable('subfolder', 'main.cpp', qresources, dependencies : qtdep)

@ -0,0 +1,6 @@
<!DOCTYPE RCC>
<RCC version="1.0">
<qresource>
<file>thing.png</file>
</qresource>
</RCC>

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Loading…
Cancel
Save