From 72edb889827a8d3fce112d140bd8d17ac285b830 Mon Sep 17 00:00:00 2001 From: Ryan Date: Tue, 22 Dec 2020 01:01:12 -0500 Subject: [PATCH] meson: add Avisynth option, compile libass_gdi_fontselect Sadly, building with Avisynth is still broken. --- meson.build | 4 ++++ meson_options.txt | 1 + src/meson.build | 7 +++++-- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index 3c331b620..0b53d1967 100644 --- a/meson.build +++ b/meson.build @@ -192,6 +192,10 @@ foreach dep: [ endif endforeach +if host_machine.system() == 'windows' and get_option('avisynth').enabled() + conf.set('WITH_AVISYNTH', 1) # bundled separately with installer +endif + if host_machine.system() == 'windows' and not get_option('directsound').disabled() dsound_dep = cc.find_library('dsound', required: get_option('directsound')) winmm_dep = cc.find_library('winmm', required: get_option('directsound')) diff --git a/meson_options.txt b/meson_options.txt index 4481aa69d..20bac21ae 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -6,6 +6,7 @@ option('directsound', type: 'feature', description: 'DirectSound audio output') option('default_audio_output', type: 'combo', choices: ['auto', 'ALSA', 'OpenAL', 'PulseAudio', 'PortAudio', 'DirectSound'], description: 'Default audio output') option('ffms2', type: 'feature', description: 'FFMS2 video source') +option('avisynth', type: 'feature', description: 'AviSynth video source') option('fftw3', type: 'feature', description: 'FFTW3 support') option('hunspell', type: 'feature', description: 'Hunspell spell checker') diff --git a/src/meson.build b/src/meson.build index 1238f6dea..29dfe2169 100644 --- a/src/meson.build +++ b/src/meson.build @@ -33,7 +33,6 @@ aegisub_src = files( 'auto4_lua_assfile.cpp', 'auto4_lua_dialog.cpp', 'auto4_lua_progresssink.cpp', - 'avisynth_wrap.cpp', 'base_grid.cpp', 'charset_detect.cpp', 'colorspace.cpp', @@ -173,8 +172,12 @@ if host_machine.system() == 'darwin' ] elif host_machine.system() == 'windows' aegisub_src += [ - 'font_file_lister_gdi.cpp' + 'avisynth_wrap.cpp', + 'font_file_lister_gdi.cpp', + 'libass_gdi_fontselect.cpp', + 'video_provider_avs.cpp', ] + if cc.has_header('wingdi.h') deps += cc.find_library('gdi32', required: true) else