From: Simon McVittie Date: Fri, 13 Dec 2024 10:53:23 +0000 (+0000) Subject: meson: Don't interpolate the result of configure_file() into a format() X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=872ce4d29a4c34b1ae8bb5d4e02fdc7a600a3075;p=thirdparty%2Fdbus.git meson: Don't interpolate the result of configure_file() into a format() configure_file() returns a file object, which was not intended to be a valid parameter for format() (even though in practice it works the way we wanted it to), causing newer Meson versions to report deprecation warnings. If the version of Meson is new enough, we can use the full_path() method. Otherwise, we'll have to re-compute the output filename. Signed-off-by: Simon McVittie --- diff --git a/dbus/meson.build b/dbus/meson.build index 87f18d914..d2acd0594 100644 --- a/dbus/meson.build +++ b/dbus/meson.build @@ -184,7 +184,12 @@ if cc.has_link_argument( meson.current_source_dir() / 'test-version-script' ) ) - version_flags = ['-Wl,--version-script,@0@'.format(version_script)] + if meson.version().version_compare('>=1.4.0') + version_script_path = version_script.full_path() + else + version_script_path = meson.current_build_dir() / 'version_script' + endif + version_flags = ['-Wl,--version-script,@0@'.format(version_script_path)] else version_flags = [] endif