Added missing sub-folder test Closes #3324 Signed-off-by: Alexis Jeandet <alexis.jeandet@member.fsf.org>pull/3326/head
parent
8efd940092
commit
0407fac59e
5 changed files with 48 additions and 11 deletions
@ -1,9 +1,17 @@ |
||||
#include <QImage> |
||||
|
||||
int main(int argc, char **argv) { |
||||
#ifndef UNITY_BUILD |
||||
Q_INIT_RESOURCE(stuff3); |
||||
QImage qi(":/thing.png"); |
||||
if(qi.width() != 640) { |
||||
Q_INIT_RESOURCE(stuff4); |
||||
#endif |
||||
|
||||
QImage img1(":/thing.png"); |
||||
if(img1.width() != 640) { |
||||
return 1; |
||||
} |
||||
QImage img2(":/thing4.png"); |
||||
if(img2.width() != 640) { |
||||
return 1; |
||||
} |
||||
return 0; |
||||
|
@ -1,4 +1,19 @@ |
||||
cfg = configuration_data() |
||||
|
||||
qresources = qtmodule.preprocess(qresources : 'resources/stuff3.qrc') |
||||
cfg.set('filepath', meson.current_source_dir()+'/../thing2.png') |
||||
rc_file = configure_file( |
||||
configuration : cfg, |
||||
input : 'resources/stuff4.qrc.in', |
||||
output : 'stuff4.qrc', |
||||
) |
||||
|
||||
app = executable('subfolder', 'main.cpp', qresources, dependencies : qtdep) |
||||
extra_cpp_args = [] |
||||
if meson.is_unity() |
||||
extra_cpp_args += '-DUNITY_BUILD' |
||||
qresources = qtmodule.preprocess(qt + '_subfolder_unity_ressource',qresources : ['resources/stuff3.qrc', rc_file]) |
||||
else |
||||
qresources = qtmodule.preprocess(qresources : ['resources/stuff3.qrc', rc_file]) |
||||
endif |
||||
|
||||
app = executable('subfolder', 'main.cpp', qresources, dependencies : qtdep, cpp_args: extra_cpp_args) |
||||
test(qt + 'subfolder', app) |
||||
|
@ -0,0 +1,6 @@ |
||||
<!DOCTYPE RCC> |
||||
<RCC version="1.0"> |
||||
<qresource> |
||||
<file alias="thing4.png">@filepath@</file> |
||||
</qresource> |
||||
</RCC> |
Loading…
Reference in new issue