| 1 |
|
| 2 |
simple_gen = find_program('generator.py', required : true) |
| 3 |
|
| 4 |
txt_resource = custom_target('txt_resource', |
| 5 |
output : 'txt_resource.txt', |
| 6 |
command : [simple_gen, '@OUTPUT@'], |
| 7 |
) |
| 8 |
|
| 9 |
cfg = configuration_data() |
| 10 |
|
| 11 |
cfg.set('filepath', meson.current_source_dir()+'/../thing2.png') |
| 12 |
cfg.set('txt_resource', txt_resource.full_path()) |
| 13 |
# here we abuse the system by guessing build dir layout |
| 14 |
cfg.set('txt_resource2', 'txt_resource.txt') |
| 15 |
|
| 16 |
|
| 17 |
rc_file = configure_file( |
| 18 |
configuration : cfg, |
| 19 |
input : 'resources/stuff4.qrc.in', |
| 20 |
output : 'stuff4.qrc', |
| 21 |
) |
| 22 |
|
| 23 |
extra_cpp_args = [] |
| 24 |
if meson.is_unity() |
| 25 |
extra_cpp_args += '-DUNITY_BUILD' |
| 26 |
qresources = qtmodule.preprocess(qt + '_subfolder_unity_resource',qresources : ['resources/stuff3.qrc', rc_file]) |
| 27 |
else |
| 28 |
qresources = qtmodule.preprocess(qresources : ['resources/stuff3.qrc', rc_file]) |
| 29 |
endif |
| 30 |
|
| 31 |
app = executable('subfolder', 'main.cpp', qresources, dependencies : qtdep, cpp_args: extra_cpp_args) |
| 32 |
test(qt + 'subfolder', app) |