meson: bump required version to 1.3.0

Newer meson versions added support for features that mpv has been using
for a long time. Annoying fallbacks were left in place to not break old
versions but ideally everyone should be using the newer build features.
Both the latest ubuntu LTS and debian stable (in backports) have 1.5.0
in their repos, so go ahead and bump the version so we can drop some old
code and let developers use newer meson features if applicable.
This commit is contained in:
Dudemanguy 2024-09-23 18:50:38 -05:00
parent 1c55d600ab
commit b52a67dde2
2 changed files with 5 additions and 27 deletions

View File

@ -2,7 +2,7 @@ project('mpv',
'c',
license: ['GPL2+', 'LGPL2.1+'],
version: files('./MPV_VERSION'),
meson_version: '>=0.62.0',
meson_version: '>=1.3.0',
default_options: [
'backend_max_links=16',
'buildtype=debugoptimized',
@ -603,7 +603,8 @@ sources += [ebml_defs, ebml_types]
subdir('common')
subdir('etc')
subdir('player')
subdir('player/javascript')
subdir('player/lua')
subdir('sub')
if darwin
@ -1684,20 +1685,9 @@ if rst2pdf.found()
endif
if meson.version().version_compare('>= 1.1.0')
configuration = meson.build_options()
else
# Arbitrary hardcoded things to pass if the meson version is too
# old to have the build_options method.
configuration = 'meson configure build ' + '-Dprefix=' + get_option('prefix') + \
' -Dbuildtype=' + get_option('buildtype') + \
' -Doptimization=' + get_option('optimization')
endif
# Set config.h
conf_data = configuration_data()
conf_data.set_quoted('CONFIGURATION', configuration)
conf_data.set_quoted('CONFIGURATION', meson.build_options())
conf_data.set_quoted('DEFAULT_DVD_DEVICE', dvd_device)
conf_data.set_quoted('DEFAULT_CDROM_DEVICE', cd_device)
@ -1813,8 +1803,7 @@ if get_option('cplayer')
mpv = executable('mpv', main_fn_source, objects: libmpv.extract_all_objects(recursive: true), dependencies: dependencies,
win_subsystem: 'windows', install: true)
# Older meson versions generate this in the player subdirectory.
if win32 and meson.version().version_compare('>= 1.3.0')
if win32
wrapper_sources= 'osdep/win32-console-wrapper.c'
executable('mpv', wrapper_sources, c_args: '-municode', link_args: '-municode',
name_suffix: 'com', install: true)

View File

@ -1,11 +0,0 @@
subdir('javascript')
subdir('lua')
# Older versions of meson don't allow multiple build targets with the same name in the same
# file. Generate it here for compatibility reasons for windows.
if win32 and get_option('cplayer') and meson.version().version_compare('< 1.3.0')
wrapper_sources= '../osdep/win32-console-wrapper.c'
executable('mpv', wrapper_sources, c_args: '-municode', link_args: '-municode',
name_suffix: 'com', install: true)
warning('mpv.com executable will be generated in the player subdirectory.')
endif