From: Nirbheek Chauhan Date: Mon, 3 Sep 2018 15:52:25 +0000 (+0530) Subject: meson: Fix libav checks to use feature options correctly X-Git-Tag: 1.19.3~481^2~295 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3e714d0bae0cf52ceebf105dab1f96a5b9622228;p=platform%2Fupstream%2Fgstreamer.git meson: Fix libav checks to use feature options correctly --- diff --git a/meson.build b/meson.build index 568b75a..d050996 100644 --- a/meson.build +++ b/meson.build @@ -31,7 +31,8 @@ if not meson.is_subproject() and cc.get_id() == 'msvc' endif libav_opt = get_option('libav') -libav_deps = [dependency('libavfilter', version: '>= 7.16.100', fallback: ['FFmpeg', 'libavfilter_dep'], required: false)] +libav_deps = [dependency('libavfilter', version: '>= 7.16.100', + fallback: ['FFmpeg', 'libavfilter_dep'], required: libav_opt)] if libav_deps[0].found() and libav_deps[0].type_name() != 'internal' cc = meson.get_compiler('c') check_ffmpeg_src = '''#include @@ -40,13 +41,9 @@ if libav_deps[0].found() and libav_deps[0].type_name() != 'internal' #else #error libav provider should be FFmpeg #endif''' - if cc.compiles(check_ffmpeg_src, dependencies : libav_deps, name : 'whether libav is provided by FFmpeg') == false - if libav_opt.enabled() - error('gst-libav is enabled but can\'t be built') - else - message('WARNING: gst-libav not built as ffmpeg n3.1.2 not found on the system') - libav_deps += [disabler()] - endif + if not cc.compiles(check_ffmpeg_src, dependencies : libav_deps, name : 'whether libav is provided by FFmpeg') + message('WARNING: gst-libav not built as ffmpeg n3.1.2 not found on the system') + libav_deps += [disabler()] endif endif