diff options
Diffstat (limited to 'meson/test cases/frameworks/7 gnome/resources-data')
6 files changed, 30 insertions, 0 deletions
diff --git a/meson/test cases/frameworks/7 gnome/resources-data/meson.build b/meson/test cases/frameworks/7 gnome/resources-data/meson.build new file mode 100644 index 000000000..31a577b2e --- /dev/null +++ b/meson/test cases/frameworks/7 gnome/resources-data/meson.build @@ -0,0 +1,18 @@ +subdir('subdir') + +python3 = import('python3').find_python() + +fake_generator_script = ''' +import os, sys +assert os.path.exists(sys.argv[1]), "File %s not found" % sys.argv[1] +print("This is a generated resource.") +''' + +# Generate file res3.txt from file res3.txt.in. This is then included +# in a GResource file, driven by resources/meson.build. +res3_txt = custom_target('res3', + input: 'res3.txt.in', + output: 'res3.txt', + command: [python3, '-c', fake_generator_script, '@INPUT@'], + capture: true, +) diff --git a/meson/test cases/frameworks/7 gnome/resources-data/res1.txt b/meson/test cases/frameworks/7 gnome/resources-data/res1.txt new file mode 100644 index 000000000..e10afea83 --- /dev/null +++ b/meson/test cases/frameworks/7 gnome/resources-data/res1.txt @@ -0,0 +1 @@ +This is a resource. diff --git a/meson/test cases/frameworks/7 gnome/resources-data/res3.txt.in b/meson/test cases/frameworks/7 gnome/resources-data/res3.txt.in new file mode 100644 index 000000000..077a8e301 --- /dev/null +++ b/meson/test cases/frameworks/7 gnome/resources-data/res3.txt.in @@ -0,0 +1 @@ +This content is ignored, but Meson doesn't need to know that. diff --git a/meson/test cases/frameworks/7 gnome/resources-data/subdir/meson.build b/meson/test cases/frameworks/7 gnome/resources-data/subdir/meson.build new file mode 100644 index 000000000..b41300f6d --- /dev/null +++ b/meson/test cases/frameworks/7 gnome/resources-data/subdir/meson.build @@ -0,0 +1,8 @@ +cdata = configuration_data() +cdata.set('NOISE', 'BARK') + +res4_txt = configure_file( + input: 'res4.txt.in', + output: 'res4.txt', + configuration: cdata +) diff --git a/meson/test cases/frameworks/7 gnome/resources-data/subdir/res2.txt b/meson/test cases/frameworks/7 gnome/resources-data/subdir/res2.txt new file mode 100644 index 000000000..d297899bb --- /dev/null +++ b/meson/test cases/frameworks/7 gnome/resources-data/subdir/res2.txt @@ -0,0 +1 @@ +This is a resource in a subdirectory. diff --git a/meson/test cases/frameworks/7 gnome/resources-data/subdir/res4.txt.in b/meson/test cases/frameworks/7 gnome/resources-data/subdir/res4.txt.in new file mode 100644 index 000000000..c0ec6f2a2 --- /dev/null +++ b/meson/test cases/frameworks/7 gnome/resources-data/subdir/res4.txt.in @@ -0,0 +1 @@ +@NOISE@ @NOISE@ @NOISE@ |