mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-21 15:40:32 +01:00
build/meson: fix location of introspection files
With glib < 2.51.3, gdbus-codegen does not understand "--output-directory" [1].
Hence, the generated files are like
"build/dbus-org.freedesktop.NetworkManager.Device.WifiP2P.xml"
instead of
"build/introspection/dbus-org.freedesktop.NetworkManager.Device.WifiP2P.xml"
But gnome.gdbus_codegen() returns a path as if it would be inside
"build/introspection". Hack around that, by patching the correct path
otherwise. This is still ugly, because repeated "ninja -C build" calls
will always try to rebuild this target (because the wrong file name
is considered).
See also [2].
[1] ee09bb704f
[2] 2e93ed58c3/mesonbuild/modules/gnome.py (L1170)
(cherry picked from commit ad9e5995e1)
This commit is contained in:
parent
ed88c71f15
commit
69b8036f37
2 changed files with 13 additions and 6 deletions
|
|
@ -23,13 +23,13 @@ configure_file(
|
|||
content_files += join_paths(meson.source_root(), 'COPYING')
|
||||
filecopier = find_program('cp')
|
||||
foreach intro : introspection_files
|
||||
path = intro.full_path().split('/')[-1]
|
||||
path = intro[1].split('/')[-1]
|
||||
custom_target(path,
|
||||
input: intro,
|
||||
input: intro[0],
|
||||
output: path,
|
||||
command : [filecopier, '@INPUT@', '@OUTPUT@'],
|
||||
command: [filecopier, intro[1], '@OUTPUT@'],
|
||||
build_by_default: true,
|
||||
)
|
||||
)
|
||||
endforeach
|
||||
|
||||
custom_target('common.ent',
|
||||
|
|
|
|||
|
|
@ -73,13 +73,20 @@ foreach iface: ifaces
|
|||
|
||||
sources += res
|
||||
|
||||
content_files += join_paths(meson.current_build_dir(), 'dbus-' + iface_xml)
|
||||
if gio_unix_dep.version().version_compare('>= 2.51.3')
|
||||
dbus_iface_xml_path = join_paths(meson.current_build_dir(), 'dbus-' + iface_xml)
|
||||
else
|
||||
dbus_iface_xml_path = join_paths(meson.build_root(), 'dbus-' + iface_xml)
|
||||
endif
|
||||
|
||||
content_files += dbus_iface_xml_path
|
||||
|
||||
# res is an array only since 0.46. Documentation won't work with
|
||||
# older versions
|
||||
if meson.version().version_compare('>= 0.46.0')
|
||||
introspection_files += res[2]
|
||||
introspection_files += [ [res[2], dbus_iface_xml_path] ]
|
||||
endif
|
||||
|
||||
endforeach
|
||||
|
||||
install_data(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue