Fix compile_resources present source directory

In certain scenarios, address the issue where gnome.compile_resources 
fails to transmit the present source directory. This is most notably 
visible with MSBuild.
This commit is contained in:
William Roy 2023-03-07 21:59:50 +00:00
parent 5822ba76d0
commit aaeec84d75
18 changed files with 18 additions and 18 deletions

View File

@ -9,7 +9,7 @@ constraint_editor_sources = [
constraint_editor_resources = gnome.compile_resources('constraint_editor_resources', constraint_editor_resources = gnome.compile_resources('constraint_editor_resources',
'constraint-editor.gresource.xml', 'constraint-editor.gresource.xml',
source_dir: '.', source_dir: meson.current_source_dir(),
) )
executable('gtk4-constraint-editor', executable('gtk4-constraint-editor',

View File

@ -225,7 +225,7 @@ if not meson.is_cross_build() and build_machine.cpu_family() != 'arm' and build_
else else
gtkdemo_resources = gnome.compile_resources('gtkdemo_resources', gtkdemo_resources = gnome.compile_resources('gtkdemo_resources',
'demo.gresource.xml', 'demo.gresource.xml',
source_dir: '.', source_dir: meson.current_source_dir()
) )
endif endif

View File

@ -8,7 +8,7 @@ iconbrowser_sources = [
iconbrowser_resources = gnome.compile_resources('iconbrowser_resources', iconbrowser_resources = gnome.compile_resources('iconbrowser_resources',
'iconbrowser.gresource.xml', 'iconbrowser.gresource.xml',
source_dir: '.', source_dir: meson.current_source_dir(),
) )
executable('gtk4-icon-browser', executable('gtk4-icon-browser',

View File

@ -7,7 +7,7 @@ node_editor_sources = [
node_editor_resources = gnome.compile_resources('node_editor_resources', node_editor_resources = gnome.compile_resources('node_editor_resources',
'node-editor.gresource.xml', 'node-editor.gresource.xml',
source_dir: '.', source_dir: meson.current_source_dir(),
) )
executable('gtk4-node-editor', executable('gtk4-node-editor',

View File

@ -69,7 +69,7 @@ if not meson.is_cross_build() and build_machine.cpu_family() != 'arm' and build_
else else
widgetfactory_resources = gnome.compile_resources('widgetfactory_resources', widgetfactory_resources = gnome.compile_resources('widgetfactory_resources',
'widget-factory.gresource.xml', 'widget-factory.gresource.xml',
source_dir: '.', source_dir: meson.current_source_dir(),
) )
endif endif

View File

@ -1,6 +1,6 @@
app2_resources = gnome.compile_resources('exampleapp2_resources', app2_resources = gnome.compile_resources('exampleapp2_resources',
'exampleapp.gresource.xml', 'exampleapp.gresource.xml',
source_dir: '.') source_dir: meson.current_source_dir())
executable('exampleapp2', executable('exampleapp2',
'exampleapp.c', 'exampleappwin.c', 'main.c', app2_resources, 'exampleapp.c', 'exampleappwin.c', 'main.c', app2_resources,

View File

@ -1,6 +1,6 @@
app3_resources = gnome.compile_resources('exampleapp3_resources', app3_resources = gnome.compile_resources('exampleapp3_resources',
'exampleapp.gresource.xml', 'exampleapp.gresource.xml',
source_dir: '.') source_dir: meson.current_source_dir())
executable('exampleapp3', executable('exampleapp3',
'exampleapp.c', 'exampleappwin.c', 'main.c', app3_resources, 'exampleapp.c', 'exampleappwin.c', 'main.c', app3_resources,

View File

@ -1,6 +1,6 @@
app4_resources = gnome.compile_resources('exampleapp4_resources', app4_resources = gnome.compile_resources('exampleapp4_resources',
'exampleapp.gresource.xml', 'exampleapp.gresource.xml',
source_dir: '.') source_dir: meson.current_source_dir())
executable('exampleapp4', executable('exampleapp4',
'exampleapp.c', 'exampleappwin.c', 'main.c', app4_resources, 'exampleapp.c', 'exampleappwin.c', 'main.c', app4_resources,

View File

@ -1,6 +1,6 @@
app5_resources = gnome.compile_resources('exampleapp5_resources', app5_resources = gnome.compile_resources('exampleapp5_resources',
'exampleapp.gresource.xml', 'exampleapp.gresource.xml',
source_dir: '.') source_dir: meson.current_source_dir())
app5_schemas = gnome.compile_schemas() app5_schemas = gnome.compile_schemas()

View File

@ -1,6 +1,6 @@
app6_resources = gnome.compile_resources('exampleapp6_resources', app6_resources = gnome.compile_resources('exampleapp6_resources',
'exampleapp.gresource.xml', 'exampleapp.gresource.xml',
source_dir: '.') source_dir: meson.current_source_dir())
app6_schemas = gnome.compile_schemas() app6_schemas = gnome.compile_schemas()

View File

@ -1,6 +1,6 @@
app7_resources = gnome.compile_resources('exampleapp7_resources', app7_resources = gnome.compile_resources('exampleapp7_resources',
'exampleapp.gresource.xml', 'exampleapp.gresource.xml',
source_dir: '.') source_dir: meson.current_source_dir())
app7_schemas = gnome.compile_schemas() app7_schemas = gnome.compile_schemas()

View File

@ -1,6 +1,6 @@
app8_resources = gnome.compile_resources('exampleapp8 resources', app8_resources = gnome.compile_resources('exampleapp8 resources',
'exampleapp.gresource.xml', 'exampleapp.gresource.xml',
source_dir: '.') source_dir: meson.current_source_dir())
app8_schemas = gnome.compile_schemas() app8_schemas = gnome.compile_schemas()

View File

@ -1,6 +1,6 @@
app9_resources = gnome.compile_resources('exampleapp9_resources', app9_resources = gnome.compile_resources('exampleapp9_resources',
'exampleapp.gresource.xml', 'exampleapp.gresource.xml',
source_dir: '.') source_dir: meson.current_source_dir())
app9_schemas = gnome.compile_schemas() app9_schemas = gnome.compile_schemas()

View File

@ -1,5 +1,5 @@
bp_resources = gnome.compile_resources('bloatpad_resources', bp_resources = gnome.compile_resources('bloatpad_resources',
'bloatpad.gresources.xml', 'bloatpad.gresources.xml',
source_dir: '.') source_dir: meson.current_source_dir())
executable('bloatpad', 'bloatpad.c', bp_resources, dependencies: libgtk_dep, c_args: common_cflags) executable('bloatpad', 'bloatpad.c', bp_resources, dependencies: libgtk_dep, c_args: common_cflags)

View File

@ -131,7 +131,7 @@ gdk_gresource_xml = configure_file(output: 'gdk.gresource.xml',
gdkresources = gnome.compile_resources('gdkresources', gdkresources = gnome.compile_resources('gdkresources',
gdk_gresource_xml, gdk_gresource_xml,
source_dir: '.', source_dir: meson.current_source_dir(),
c_name: '_gdk', c_name: '_gdk',
extra_args: '--manual-register', extra_args: '--manual-register',
) )

View File

@ -164,7 +164,7 @@ gskenum_h = gsk_enums[1]
gskresources = gnome.compile_resources('gskresources', gskresources = gnome.compile_resources('gskresources',
gsk_resources_xml, gsk_resources_xml,
dependencies: gsk_private_vulkan_compiled_shaders_deps, dependencies: gsk_private_vulkan_compiled_shaders_deps,
source_dir: '.', source_dir: meson.current_source_dir(),
c_name: '_gsk', c_name: '_gsk',
extra_args: [ '--manual-register', ], extra_args: [ '--manual-register', ],
) )

View File

@ -913,7 +913,7 @@ foreach lang : [
gnome.compile_resources(lang, gnome.compile_resources(lang,
resxml, resxml,
source_dir: 'emoji', source_dir: join_paths(meson.current_source_dir(), 'emoji'),
gresource_bundle: true, gresource_bundle: true,
install: true, install: true,
install_dir: gtk_datadir / 'gtk-4.0/emoji', install_dir: gtk_datadir / 'gtk-4.0/emoji',

View File

@ -10,7 +10,7 @@ styletest_env.set('G_ENABLE_DIAGNOSTIC', '0')
cssresources = gnome.compile_resources( cssresources = gnome.compile_resources(
'cssresources', 'cssresources',
'test-css-style.gresource.xml', 'test-css-style.gresource.xml',
source_dir: '.', source_dir: meson.current_source_dir(),
) )
test_style = executable('test-css-style', test_style = executable('test-css-style',