@@ -30,10 +30,10 @@ gnome.compile_resources('simple-resources',
30
30
test (' simple resource test (gresource)' , find_program (' resources.py' ))
31
31
32
32
if not pretend_glib_old and glib.version() >= ' 2.52.0'
33
- # This test cannot pass if GLib version is older than 9.99.9.
34
- # Meson will raise an error if the user tries to use the 'dependencies'
35
- # argument and the version of GLib is too old for generated resource
36
- # dependencies to work correctly .
33
+ # This test cannot pass if GLib version is too old. Generated resource
34
+ # dependencies do not work correctly and Meson will raise an error if the
35
+ # user tries to use either the 'dependencies' kwarg or a gresource file that
36
+ # is itself generated .
37
37
generated_resources = gnome.compile_resources(' generated-resources' ,
38
38
' generated.gresource.xml' ,
39
39
source_dir : ' ../resources-data' ,
@@ -44,6 +44,25 @@ if not pretend_glib_old and glib.version() >= '2.52.0'
44
44
' generated-main.c' , generated_resources,
45
45
dependencies : gio)
46
46
test (' generated resource test' , generated_res_exe)
47
+
48
+ # Test with a CustomTarget
49
+ subdir (' generated' )
50
+
51
+ ct_resources = gnome.compile_resources(
52
+ ' ct-resources' ,
53
+ ct_simple_gresource,
54
+ install_header : true ,
55
+ export : true ,
56
+ source_dir : ' ../resources-data' ,
57
+ c_name : ' simple_resources' )
58
+
59
+ cti_resources = gnome.compile_resources(
60
+ ' cti-resources' ,
61
+ ct_simple_gresource[0 ],
62
+ install_header : true ,
63
+ export : true ,
64
+ source_dir : ' ../resources-data' ,
65
+ c_name : ' simple_resources' )
47
66
endif
48
67
49
68
# Test build_by_default
0 commit comments