diff --git a/meson.build b/meson.build index 1ae869bdeb..1544db6e91 100644 --- a/meson.build +++ b/meson.build @@ -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) diff --git a/player/meson.build b/player/meson.build deleted file mode 100644 index be1e812d3e..0000000000 --- a/player/meson.build +++ /dev/null @@ -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