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 <smcv@collabora.com>
(cherry picked from commit
872ce4d29a4c34b1ae8bb5d4e02fdc7a600a3075)
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