summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2018-07-27 18:59:23 +0530
committerNirbheek Chauhan <nirbheek@centricular.com>2018-07-27 19:04:38 +0530
commitb55dfb5313f1df702a3637efbd372b90cd12a300 (patch)
treeae7f255314e783be74b9201cd6dfcd8ca9da18b5 /ext
parent7ef303fa281b9226ebd0087fb377ca25887941e4 (diff)
downloadgstreamer-plugins-bad-b55dfb5313f1df702a3637efbd372b90cd12a300.tar.gz
Add feature options for almost all plugins
The only plugins remaining are those that haven't been ported to Meson yet, and msdk. Also, the tests are still automagic. https://bugzilla.gnome.org/show_bug.cgi?id=795107
Diffstat (limited to 'ext')
-rw-r--r--ext/aom/meson.build2
-rw-r--r--ext/assrender/meson.build3
-rw-r--r--ext/bs2b/meson.build2
-rw-r--r--ext/bz2/meson.build2
-rw-r--r--ext/chromaprint/meson.build2
-rw-r--r--ext/closedcaption/meson.build3
-rw-r--r--ext/dash/meson.build2
-rw-r--r--ext/directfb/meson.build2
-rw-r--r--ext/dtls/meson.build3
-rw-r--r--ext/dts/meson.build16
-rw-r--r--ext/faac/meson.build8
-rw-r--r--ext/faad/meson.build4
-rw-r--r--ext/fdkaac/meson.build2
-rw-r--r--ext/flite/meson.build12
-rw-r--r--ext/fluidsynth/meson.build2
-rw-r--r--ext/gl/meson.build2
-rw-r--r--ext/gsm/meson.build16
-rw-r--r--ext/hls/meson.build44
-rw-r--r--ext/iqa/meson.build2
-rw-r--r--ext/kate/meson.build4
-rw-r--r--ext/ladspa/meson.build16
-rw-r--r--ext/libde265/meson.build2
-rw-r--r--ext/libmms/meson.build2
-rw-r--r--ext/lv2/meson.build4
-rw-r--r--ext/meson.build2
-rw-r--r--ext/mpeg2enc/meson.build40
-rw-r--r--ext/mplex/meson.build34
-rw-r--r--ext/openh264/meson.build6
-rw-r--r--ext/openjpeg/meson.build7
-rw-r--r--ext/opus/meson.build2
-rw-r--r--ext/resindvd/meson.build4
-rw-r--r--ext/rsvg/meson.build2
-rw-r--r--ext/rtmp/meson.build2
-rw-r--r--ext/sbc/meson.build2
-rw-r--r--ext/smoothstreaming/meson.build2
-rw-r--r--ext/soundtouch/meson.build6
-rw-r--r--ext/spandsp/meson.build2
-rw-r--r--ext/srt/meson.build8
-rw-r--r--ext/srtp/meson.build6
-rw-r--r--ext/ttml/meson.build12
-rw-r--r--ext/voaacenc/meson.build2
-rw-r--r--ext/vulkan/meson.build13
-rw-r--r--ext/webp/meson.build2
-rw-r--r--ext/webrtc/meson.build2
-rw-r--r--ext/webrtcdsp/meson.build3
-rw-r--r--ext/x265/meson.build2
-rw-r--r--ext/zbar/meson.build2
47 files changed, 209 insertions, 111 deletions
diff --git a/ext/aom/meson.build b/ext/aom/meson.build
index a16afcf26..355411c01 100644
--- a/ext/aom/meson.build
+++ b/ext/aom/meson.build
@@ -1,4 +1,4 @@
-aom_dep = dependency('aom', required: false)
+aom_dep = dependency('aom', required: get_option('aom'))
if aom_dep.found()
gstaom = library('gstaom',
['gstaom.c', 'gstav1enc.c', 'gstav1dec.c'],
diff --git a/ext/assrender/meson.build b/ext/assrender/meson.build
index fa5f18951..9c8d82cc4 100644
--- a/ext/assrender/meson.build
+++ b/ext/assrender/meson.build
@@ -1,5 +1,4 @@
-ass_dep = dependency('libass', version : '>= 0.10.2', required : false)
-
+ass_dep = dependency('libass', version : '>= 0.10.2', required : get_option('assrender'))
if ass_dep.found()
gstassrender = library('gstassrender',
'gstassrender.c',
diff --git a/ext/bs2b/meson.build b/ext/bs2b/meson.build
index 9b5cd4c17..1d0d25ebb 100644
--- a/ext/bs2b/meson.build
+++ b/ext/bs2b/meson.build
@@ -1,6 +1,6 @@
bs2b_sources = [ 'gstbs2b.c', ]
-bs2b_dep = dependency('libbs2b', version : '>=3.1.0', required : false)
+bs2b_dep = dependency('libbs2b', version : '>=3.1.0', required : get_option('bs2b'))
if bs2b_dep.found()
gstbs2b = library('gstbs2b',
diff --git a/ext/bz2/meson.build b/ext/bz2/meson.build
index 48a2dd91e..cbab41bb1 100644
--- a/ext/bz2/meson.build
+++ b/ext/bz2/meson.build
@@ -4,7 +4,7 @@ bz2_sources = [
'gstbz2enc.c',
]
-bz2_dep = cc.find_library('bz2', required : false)
+bz2_dep = cc.find_library('bz2', required : get_option('bz2'))
if bz2_dep.found() and cc.has_header_symbol('bzlib.h', 'BZ2_bzlibVersion')
gstbz2 = library('gstbz2',
diff --git a/ext/chromaprint/meson.build b/ext/chromaprint/meson.build
index 1c6af7765..05df5012b 100644
--- a/ext/chromaprint/meson.build
+++ b/ext/chromaprint/meson.build
@@ -1,4 +1,4 @@
-chromaprint_dep = dependency('libchromaprint', required : false)
+chromaprint_dep = dependency('libchromaprint', required : get_option('chromaprint'))
if chromaprint_dep.found()
gstchromaprint = library('gstchromaprint',
diff --git a/ext/closedcaption/meson.build b/ext/closedcaption/meson.build
index 4e1ed3a37..cf1563894 100644
--- a/ext/closedcaption/meson.build
+++ b/ext/closedcaption/meson.build
@@ -1,4 +1,5 @@
-pangocairo_dep = dependency('pangocairo', version : '>= 1.22.0', required : false)
+pangocairo_dep = dependency('pangocairo', version : '>= 1.22.0',
+ required : get_option('closedcaption'))
zvbi_sources = [
'bit_slicer.c',
diff --git a/ext/dash/meson.build b/ext/dash/meson.build
index 3d7a0153b..3a167d8b8 100644
--- a/ext/dash/meson.build
+++ b/ext/dash/meson.build
@@ -4,7 +4,7 @@ dash_sources = [
'gstplugin.c',
]
-xml2_dep = dependency('libxml-2.0', version : '>= 2.8', required : false)
+xml2_dep = dependency('libxml-2.0', version : '>= 2.8', required : get_option('dash'))
if xml2_dep.found()
gstsouphttpsrc = library('gstdashdemux',
dash_sources,
diff --git a/ext/directfb/meson.build b/ext/directfb/meson.build
index 686807d22..b4b777ab3 100644
--- a/ext/directfb/meson.build
+++ b/ext/directfb/meson.build
@@ -1,4 +1,4 @@
-directfb_dep = dependency('directfb', version : '>= 0.9.24', required : false)
+directfb_dep = dependency('directfb', version : '>= 0.9.24', required : get_option('directfb'))
if directfb_dep.found()
gstdirectfb = library('gstdirectfb',
diff --git a/ext/dtls/meson.build b/ext/dtls/meson.build
index 846d1fa2f..da8d886bc 100644
--- a/ext/dtls/meson.build
+++ b/ext/dtls/meson.build
@@ -11,7 +11,8 @@ dtls_sources = [
'plugin.c',
]
-libcrypto_dep = dependency('libcrypto', required : false)
+openssl_dep = dependency('openssl', version : '>= 1.0.1', required : get_option('dtls'))
+libcrypto_dep = dependency('libcrypto', required : get_option('dtls'))
if openssl_dep.found() and libcrypto_dep.found()
gstdtls = library('gstdtls',
diff --git a/ext/dts/meson.build b/ext/dts/meson.build
index 567f0359b..1e4b3e2d0 100644
--- a/ext/dts/meson.build
+++ b/ext/dts/meson.build
@@ -1,7 +1,17 @@
-dca_dep = dependency('libdca', required : false)
+# Don't do any dependency checks if disabled
+if get_option('dts').disabled()
+ subdir_done()
+endif
-if not dca_dep.found() and cc.has_header_symbol('dca.h', 'dca_init')
- dca_dep = cc.find_library('dca', required : false)
+# Detect libdca using a pkg-config file, or manually
+dca_dep = dependency('libdca', required : false)
+if not dca_dep.found()
+ if cc.has_header_symbol('dca.h', 'dca_init')
+ dca_dep = cc.find_library('dca', required : false)
+ endif
+ if not dca_dep.found() and get_option('dts').enabled()
+ error('DTS plugin enabled, but libdca not found')
+ endif
endif
# autotools didn't use the libdca pkg-config cflags, and they
diff --git a/ext/faac/meson.build b/ext/faac/meson.build
index e23edaf8d..f5f1e8c2c 100644
--- a/ext/faac/meson.build
+++ b/ext/faac/meson.build
@@ -1,6 +1,10 @@
-faac_dep = cc.find_library('faac', required : false)
+faac_dep = cc.find_library('faac', required : get_option('faac'))
+have_faac_h = cc.has_header_symbol('faac.h', 'faacEncOpen')
+if not have_faac_h and get_option('faac').enabled()
+ error('faac plugin enabled: found libfaac, but not faac.h')
+endif
-if faac_dep.found() and cc.has_header_symbol('faac.h', 'faacEncOpen')
+if faac_dep.found() and have_faac_h
gstfaac = library('gstfaac',
'gstfaac.c',
c_args : gst_plugins_bad_args,
diff --git a/ext/faad/meson.build b/ext/faad/meson.build
index 9bd8e2dd3..533c11c15 100644
--- a/ext/faad/meson.build
+++ b/ext/faad/meson.build
@@ -2,11 +2,11 @@ faad_args = [ ]
have_faad = cc.has_header_symbol('neaacdec.h', 'NeAACDecOpen')
have_faad_2_7 = have_faad and cc.has_header_symbol('neaacdec.h', 'LATM')
-if have_faad and not have_faad_2_7
+if have_faad and not have_faad_2_7 and get_option('faad').enabled()
message('Found faad2, but too old (< v2.7.0)')
endif
-faad_dep = cc.find_library('faad', required : false)
+faad_dep = cc.find_library('faad', required : get_option('faad'))
if faad_dep.found() and have_faad_2_7
gstfaad = library('gstfaad',
diff --git a/ext/fdkaac/meson.build b/ext/fdkaac/meson.build
index 399704cf1..27c16a5a7 100644
--- a/ext/fdkaac/meson.build
+++ b/ext/fdkaac/meson.build
@@ -1,4 +1,4 @@
-fdkaac_dep = dependency('fdk-aac', required : false)
+fdkaac_dep = dependency('fdk-aac', required : get_option('fdkaac'))
if fdkaac_dep.found()
fdkaac_defines = []
diff --git a/ext/flite/meson.build b/ext/flite/meson.build
index 4470ab662..10dd2e036 100644
--- a/ext/flite/meson.build
+++ b/ext/flite/meson.build
@@ -10,15 +10,23 @@ flite_libs = [
'flite_cmulex'
]
+if get_option('flite').disabled()
+ subdir_done()
+endif
+
flite_deps = [ ]
foreach flite_lib : flite_libs
- flite_lib_dep = cc.find_library(flite_lib, required : false)
+ flite_lib_dep = cc.find_library(flite_lib, required : get_option('flite'))
if flite_lib_dep.found()
flite_deps += [flite_lib_dep]
endif
endforeach
+have_flite_h = cc.has_header_symbol('flite/flite.h', 'flite_init')
+if not have_flite_h and get_option('flite').enabled()
+ error('flite plugin enabled, but flite.h not found')
+endif
-if flite_deps.length() == flite_libs.length() and cc.has_header_symbol('flite/flite.h', 'flite_init')
+if flite_deps.length() == flite_libs.length() and have_flite_h
gstflite = library('gstflite',
flite_sources,
c_args : gst_plugins_bad_args,
diff --git a/ext/fluidsynth/meson.build b/ext/fluidsynth/meson.build
index 740d1f659..09f39750f 100644
--- a/ext/fluidsynth/meson.build
+++ b/ext/fluidsynth/meson.build
@@ -1,4 +1,4 @@
-fluidsynth_dep = dependency('fluidsynth', version : '>= 1.0', required : false)
+fluidsynth_dep = dependency('fluidsynth', version : '>= 1.0', required : get_option('fluidsynth'))
if fluidsynth_dep.found()
gstfluidsynth = library('gstfluidsynthmidi',
diff --git a/ext/gl/meson.build b/ext/gl/meson.build
index 3a4d5cdc8..3fb9239ae 100644
--- a/ext/gl/meson.build
+++ b/ext/gl/meson.build
@@ -8,7 +8,7 @@ opengl_sources = [
'gstglutils.c',
]
-if build_gstgl and gstgl_dep.found()
+if gstgl_dep.found()
optional_deps = []
opengl_defines = ['-DGST_USE_UNSTABLE_API'] # for videoaggregator
diff --git a/ext/gsm/meson.build b/ext/gsm/meson.build
index ef36d19eb..a5ad2d457 100644
--- a/ext/gsm/meson.build
+++ b/ext/gsm/meson.build
@@ -1,7 +1,17 @@
-gsm_dep = cc.find_library('gsm', required : false)
+if get_option('gsm').disabled()
+ subdir_done()
+endif
+
+gsm_dep = cc.find_library('gsm', required : get_option('gsm'))
+have_gsm_create = cc.has_header_symbol('gsm.h', 'gsm_create')
+if not have_gsm_create
+ have_gsm_create = cc.has_header_symbol('gsm/smg.h', 'gsm_create')
+ if not have_gsm_create and get_option('gsm').enabled()
+ error('GSM plugin is enabled: found libgsm but no headers')
+ endif
+endif
-if gsm_dep.found() and (cc.has_header_symbol('gsm.h', 'gsm_create') or
- cc.has_header_symbol('gsm/smg.h', 'gsm_create'))
+if gsm_dep.found() and have_gsm_create
gstgsm = library('gstgsm',
['gstgsm.c', 'gstgsmenc.c', 'gstgsmdec.c'],
c_args : gst_plugins_bad_args,
diff --git a/ext/hls/meson.build b/ext/hls/meson.build
index e631958ab..1f5f58d42 100644
--- a/ext/hls/meson.build
+++ b/ext/hls/meson.build
@@ -10,23 +10,45 @@ hls_sources = [
hls_cargs = ['-DGST_USE_UNSTABLE_API']
-# FIXME: Add an option for selecting the library, and fail if it's not found
-hls_crypto_dep = dependency('nettle', required : false)
-if hls_crypto_dep.found()
- hls_cargs += ['-DHAVE_NETTLE']
-else
- hls_crypto_dep = cc.find_library('gcrypt', required : false)
- if hls_crypto_dep.found()
- hls_cargs += ['-DHAVE_LIBGCRYPT']
- else
- hls_crypto_dep = openssl_dep
+hls_crypto = get_option('hls-crypto')
+hls_option = get_option('hls')
+
+have_hls_crypto = false
+if not hls_option.disabled()
+ if ['auto', 'nettle'].contains(hls_crypto)
+ hls_crypto_dep = dependency('nettle', required : false)
+ if hls_crypto_dep.found()
+ have_hls_crypto = true
+ hls_cargs += ['-DHAVE_NETTLE']
+ endif
+ endif
+
+ if not hls_crypto_dep.found() and ['auto', 'libgcrypt'].contains(hls_crypto)
+ hls_crypto_dep = cc.find_library('gcrypt', required : false)
+ if hls_crypto_dep.found()
+ have_hls_crypto = true
+ hls_cargs += ['-DHAVE_LIBGCRYPT']
+ endif
+ endif
+
+ if not hls_crypto_dep.found() and ['auto', 'openssl'].contains(hls_crypto)
+ hls_crypto_dep = dependency('openssl', required : false)
if hls_crypto_dep.found()
+ have_hls_crypto = true
hls_cargs += ['-DHAVE_OPENSSL']
endif
endif
+
+ if not have_hls_crypto and hls_option.enabled()
+ if hls_crypto == 'auto'
+ error('HLS plugin enabled, but found none of nettle, libgcrypt, or openssl')
+ else
+ error('HLS plugin enabled, but crypto library "@0@" not found'.format(hls_crypto))
+ endif
+ endif
endif
-if hls_crypto_dep.found()
+if have_hls_crypto
gsthls = library('gsthls',
hls_sources,
c_args : gst_plugins_bad_args + hls_cargs,
diff --git a/ext/iqa/meson.build b/ext/iqa/meson.build
index adf351dee..c5d1c1c8a 100644
--- a/ext/iqa/meson.build
+++ b/ext/iqa/meson.build
@@ -1,4 +1,4 @@
-dssim_dep = dependency('dssim', required : false,
+dssim_dep = dependency('dssim', required : get_option('iqa'),
fallback: ['dssim', 'dssim_dep'])
if dssim_dep.found()
diff --git a/ext/kate/meson.build b/ext/kate/meson.build
index 241fa4c10..8c02b939d 100644
--- a/ext/kate/meson.build
+++ b/ext/kate/meson.build
@@ -8,9 +8,9 @@ kate_sources = [
'gstkatespu.c',
]
-kate_dep = dependency('kate', version : '>=0.1.7', required : false)
+kate_dep = dependency('kate', version : '>=0.1.7', required : get_option('kate'))
# Not used
-#tiger_dep = dependency('tiger', version : '>=0.3.2', required : false)
+#tiger_dep = dependency('tiger', version : '>=0.3.2', required : get_option('kate'))
if kate_dep.found()
gstkate = library('gstkate',
diff --git a/ext/ladspa/meson.build b/ext/ladspa/meson.build
index 317f6d77b..381ce2f4f 100644
--- a/ext/ladspa/meson.build
+++ b/ext/ladspa/meson.build
@@ -8,18 +8,28 @@ ladspa_sources = [
ladspa_cargs = []
-lrdf_dep = dependency('lrdf', required : false)
+if get_option('ladspa').disabled()
+ subdir_done()
+endif
+
+# This is an optional dep, but we make it optional only in auto mode
+lrdf_dep = dependency('lrdf', required : get_option('ladspa'))
if lrdf_dep.found()
ladspa_cargs = ['-DHAVE_LRDF']
endif
-if cc.has_header('ladspa.h')
+have_ladspa_h = cc.has_header('ladspa.h')
+if not have_ladspa_h and get_option('ladspa').enabled()
+ error('ladspa plugin is enabled but ladspa.h not found')
+endif
+
+if have_ladspa_h
gstladspa = library('gstladspa',
ladspa_sources,
c_args : gst_plugins_bad_args + ladspa_cargs,
link_args : noseh_link_args,
include_directories : [configinc, libsinc],
- dependencies : [gstaudio_dep, gstbase_dep, gmodule_dep, lrdf_dep, mathlib],
+ dependencies : [gstaudio_dep, gstbase_dep, gmodule_dep, lrdf_dep, libm],
install : true,
install_dir : plugins_install_dir,
)
diff --git a/ext/libde265/meson.build b/ext/libde265/meson.build
index b638f63d7..8ae8b90a8 100644
--- a/ext/libde265/meson.build
+++ b/ext/libde265/meson.build
@@ -3,7 +3,7 @@ de265_sources = [
'libde265-dec.c',
]
-de265_dep = dependency('libde265', version : '>= 0.9', required : false)
+de265_dep = dependency('libde265', version : '>= 0.9', required : get_option('libde265'))
if de265_dep.found()
gstde265 = library('gstde265',
diff --git a/ext/libmms/meson.build b/ext/libmms/meson.build
index 960452041..6bb1b3eb3 100644
--- a/ext/libmms/meson.build
+++ b/ext/libmms/meson.build
@@ -1,4 +1,4 @@
-mms_dep = dependency('libmms', version : '>= 0.4', required : false)
+mms_dep = dependency('libmms', version : '>= 0.4', required : get_option('libmms'))
if mms_dep.found()
gstmms = library('gstmms',
diff --git a/ext/lv2/meson.build b/ext/lv2/meson.build
index 730fc0914..741f3b8ba 100644
--- a/ext/lv2/meson.build
+++ b/ext/lv2/meson.build
@@ -5,14 +5,14 @@ lv2_sources = [
'gstlv2utils.c',
]
-lv2_dep = dependency('lilv-0', version : '>= 0.22', required : false)
+lv2_dep = dependency('lilv-0', version : '>= 0.22', required : get_option('lv2'))
if lv2_dep.found()
gstrsvg = library('gstlv2',
lv2_sources,
c_args : gst_plugins_bad_args,
link_args : noseh_link_args,
include_directories : [configinc],
- dependencies : [gstaudio_dep, gstbase_dep, lv2_dep, mathlib],
+ dependencies : [gstaudio_dep, gstbase_dep, lv2_dep, libm],
install : true,
install_dir : plugins_install_dir,
)
diff --git a/ext/meson.build b/ext/meson.build
index fbd73ff76..7b51a8203 100644
--- a/ext/meson.build
+++ b/ext/meson.build
@@ -64,8 +64,8 @@ subdir('voaacenc')
#subdir('voamrwbenc')
subdir('vulkan')
subdir('wayland')
-subdir('webrtcdsp')
subdir('webrtc')
+subdir('webrtcdsp')
subdir('webp')
subdir('x265')
subdir('zbar')
diff --git a/ext/mpeg2enc/meson.build b/ext/mpeg2enc/meson.build
index 7f49b91ac..69011a470 100644
--- a/ext/mpeg2enc/meson.build
+++ b/ext/mpeg2enc/meson.build
@@ -1,20 +1,22 @@
-if mjpegtools_dep.found()
- mpeg2enc_dep = cxx.find_library('mpeg2encpp', required : false)
-
- if mpeg2enc_dep.found()
- gstmpeg2enc = library('gstmpeg2enc',
- 'gstmpeg2enc.cc',
- 'gstmpeg2encoptions.cc',
- 'gstmpeg2encoder.cc',
- 'gstmpeg2encstreamwriter.cc',
- 'gstmpeg2encpicturereader.cc',
- cpp_args : gst_plugins_bad_args + ['-DGST_MJPEGTOOLS_API=' + mjpegtools_api],
- link_args : noseh_link_args,
- include_directories : [configinc, libsinc],
- dependencies : [gstvideo_dep, mjpegtools_dep, mpeg2enc_dep],
- install : true,
- install_dir : plugins_install_dir,
- )
- pkgconfig.generate(gstmpeg2enc, install_dir : plugins_pkgconfig_install_dir)
- endif
+# mjpegtools upstream breaks API constantly and doesn't export the version in
+# a header anywhere. The configure file has a lot of logic to support old
+# versions, but it all seems untested and broken. Require 2.0.0. Can be changed
+# if someone complains.
+mjpegtools_dep = dependency('mjpegtools', version : '>=2.0.0', required : get_option('mpeg2enc'))
+mpeg2enc_dep = cxx.find_library('mpeg2encpp', required : get_option('mpeg2enc'))
+if mjpegtools_dep.found() and mpeg2enc_dep.found()
+ gstmpeg2enc = library('gstmpeg2enc',
+ 'gstmpeg2enc.cc',
+ 'gstmpeg2encoptions.cc',
+ 'gstmpeg2encoder.cc',
+ 'gstmpeg2encstreamwriter.cc',
+ 'gstmpeg2encpicturereader.cc',
+ cpp_args : gst_plugins_bad_args + ['-DGST_MJPEGTOOLS_API=2000'],
+ link_args : noseh_link_args,
+ include_directories : [configinc, libsinc],
+ dependencies : [gstvideo_dep, mjpegtools_dep, mpeg2enc_dep],
+ install : true,
+ install_dir : plugins_install_dir,
+ )
+ pkgconfig.generate(gstmpeg2enc, install_dir : plugins_pkgconfig_install_dir)
endif
diff --git a/ext/mplex/meson.build b/ext/mplex/meson.build
index 01a5683df..3bc697eb8 100644
--- a/ext/mplex/meson.build
+++ b/ext/mplex/meson.build
@@ -1,19 +1,19 @@
-if mjpegtools_dep.found()
- mplex2_dep = cxx.find_library('mplex2', required : false)
+# See: ext/mpeg2enc for note about mjpegtools dep
+mjpegtools_dep = dependency('mjpegtools', version : '>=2.0.0', required : get_option('mplex'))
+mplex2_dep = cxx.find_library('mplex2', required : get_option('mplex'))
- if mplex2_dep.found()
- gstmplex2 = library('gstmplex',
- 'gstmplex.cc',
- 'gstmplexibitstream.cc',
- 'gstmplexjob.cc',
- 'gstmplexoutputstream.cc',
- cpp_args : gst_plugins_bad_args + ['-DGST_MJPEGTOOLS_API=' + mjpegtools_api],
- link_args : noseh_link_args,
- include_directories : [configinc, libsinc],
- dependencies : [gstaudio_dep, mjpegtools_dep, mplex2_dep],
- install : true,
- install_dir : plugins_install_dir,
- )
- pkgconfig.generate(gstmplex2, install_dir : plugins_pkgconfig_install_dir)
- endif
+if mjpegtools_dep.found() and mplex2_dep.found()
+ gstmplex2 = library('gstmplex',
+ 'gstmplex.cc',
+ 'gstmplexibitstream.cc',
+ 'gstmplexjob.cc',
+ 'gstmplexoutputstream.cc',
+ cpp_args : gst_plugins_bad_args + ['-DGST_MJPEGTOOLS_API=2000'],
+ link_args : noseh_link_args,
+ include_directories : [configinc, libsinc],
+ dependencies : [gstaudio_dep, mjpegtools_dep, mplex2_dep],
+ install : true,
+ install_dir : plugins_install_dir,
+ )
+ pkgconfig.generate(gstmplex2, install_dir : plugins_pkgconfig_install_dir)
endif
diff --git a/ext/openh264/meson.build b/ext/openh264/meson.build
index 4a85d8774..522857a81 100644
--- a/ext/openh264/meson.build
+++ b/ext/openh264/meson.build
@@ -4,10 +4,10 @@ openh264_sources = [
'gstopenh264plugin.c',
]
-openh264_dep = dependency('openh264', version : '>= 1.3.0', required : false,
- fallback: ['openh264', 'openh264_dep'])
+openh264_dep = dependency('openh264', version : '>= 1.3.0',
+ required : get_option('openh264'),
+ fallback: ['openh264', 'openh264_dep'])
-# FIXME: check if C++ compiler is available via new add_languages() semantics in meson git (~v30)
if openh264_dep.found()
gstopenh264 = library('gstopenh264',
openh264_sources,
diff --git a/ext/openjpeg/meson.build b/ext/openjpeg/meson.build
index eef8c0894..1c08bd132 100644
--- a/ext/openjpeg/meson.build
+++ b/ext/openjpeg/meson.build
@@ -6,12 +6,19 @@ openjpeg_sources = [
openjpeg_cargs = []
+if get_option('openjpeg').disabled()
+ subdir_done()
+endif
+
openjpeg_dep = dependency('libopenjp2', version : '>=2.1', required : false)
if not openjpeg_dep.found()
# Fallback to v1.5
openjpeg_dep = dependency('libopenjpeg1', required : false)
openjpeg_cargs += ['-DHAVE_OPENJPEG_1']
endif
+if not openjpeg_dep.found() and get_option('openjpeg').enabled()
+ error('openjpeg plugin enabled, but neither libopenjp2 nor libopenjpeg1 not found')
+endif
if openjpeg_dep.found()
gstopenjpeg = library('gstopenjpeg',
diff --git a/ext/opus/meson.build b/ext/opus/meson.build
index 9f7e0d3f8..7b14b4f9d 100644
--- a/ext/opus/meson.build
+++ b/ext/opus/meson.build
@@ -4,7 +4,7 @@ opus_sources = [
'gstopusparse.c',
]
-opus_dep = dependency('opus', version : '>= 0.9.4', required : false)
+opus_dep = dependency('opus', version : '>= 0.9.4', required : get_option('opus'))
if opus_dep.found()
gstopus = library('gstopusparse',
diff --git a/ext/resindvd/meson.build b/ext/resindvd/meson.build
index 95d711f29..4d186212f 100644
--- a/ext/resindvd/meson.build
+++ b/ext/resindvd/meson.build
@@ -10,8 +10,8 @@ resindvd_sources = [
'rsnparsetter.c',
]
-dvdnav_dep = dependency('dvdnav', version : '>= 4.1.2', required : false)
-dvdread_dep = dependency('dvdread', version : '>= 4.1.2', required : false)
+dvdnav_dep = dependency('dvdnav', version : '>= 4.1.2', required : get_option('resindvd'))
+dvdread_dep = dependency('dvdread', version : '>= 4.1.2', required : get_option('resindvd'))
if dvdnav_dep.found() and dvdread_dep.found()
gstresindvd = library('gstresindvd',
diff --git a/ext/rsvg/meson.build b/ext/rsvg/meson.build
index 109ec2697..ebbf5ab37 100644
--- a/ext/rsvg/meson.build
+++ b/ext/rsvg/meson.build
@@ -4,7 +4,7 @@ rsvg_sources = [
'gstrsvgoverlay.c',
]
-rsvg_dep = dependency('librsvg-2.0', version : '>= 2.36.2', required : false)
+rsvg_dep = dependency('librsvg-2.0', version : '>= 2.36.2', required : get_option('rsvg'))
if rsvg_dep.found()
gstrsvg = library('gstrsvg',
rsvg_sources,
diff --git a/ext/rtmp/meson.build b/ext/rtmp/meson.build
index 149df39ad..0efe416e2 100644
--- a/ext/rtmp/meson.build
+++ b/ext/rtmp/meson.build
@@ -4,7 +4,7 @@ rtmp_sources = [
'gstrtmpsrc.c',
]
-rtmp_dep = dependency('librtmp', required : false)
+rtmp_dep = dependency('librtmp', required : get_option('rtmp'))
if rtmp_dep.found()
gstrtmp = library('gstrtmp',
diff --git a/ext/sbc/meson.build b/ext/sbc/meson.build
index 5fe7217e0..e0d3ed353 100644
--- a/ext/sbc/meson.build
+++ b/ext/sbc/meson.build
@@ -4,7 +4,7 @@ sbc_sources = [
'gstsbcenc.c',
]
-sbc_dep = dependency('sbc', version : '>= 1.0', required : false)
+sbc_dep = dependency('sbc', version : '>= 1.0', required : get_option('sbc'))
if sbc_dep.found()
gstsbc = library('gstsbc',
diff --git a/ext/smoothstreaming/meson.build b/ext/smoothstreaming/meson.build
index e1358cf61..17fd13d6e 100644
--- a/ext/smoothstreaming/meson.build
+++ b/ext/smoothstreaming/meson.build
@@ -5,7 +5,7 @@ smoothstreaming_sources = [
'gstsmoothstreaming-plugin.c',
]
-xml28_dep = dependency('libxml-2.0', version : '>= 2.8', required : false)
+xml28_dep = dependency('libxml-2.0', version : '>= 2.8', required : get_option('smoothstreaming'))
if xml28_dep.found()
gstmss = library('gstsmoothstreaming',
diff --git a/ext/soundtouch/meson.build b/ext/soundtouch/meson.build
index 600182d08..793ee4d4e 100644
--- a/ext/soundtouch/meson.build
+++ b/ext/soundtouch/meson.build
@@ -5,6 +5,9 @@ soundtouch_sources = [
]
soundtouch_cargs = ['-DHAVE_SOUNDTOUCH']
+if get_option('soundtouch').disabled()
+ subdir_done()
+endif
soundtouch_dep = dependency('soundtouch', required : false)
if soundtouch_dep.found()
@@ -19,6 +22,9 @@ else
# Add them back once we know which distros use them.
endif
endif
+if not soundtouch_dep.found() and get_option('soundtouch').enabled()
+ error('soundtouch plugin enabled but soundtouch library not found')
+endif
if soundtouch_dep.found()
gstsoundtouch = library('gstsoundtouch',
diff --git a/ext/spandsp/meson.build b/ext/spandsp/meson.build
index 7998ff910..0f1017275 100644
--- a/ext/spandsp/meson.build
+++ b/ext/spandsp/meson.build
@@ -8,7 +8,7 @@ spandsp_sources = [
'gsttonegeneratesrc.h',
]
-spandsp_dep = dependency('spandsp', version : '>= 0.0.6', required : false)
+spandsp_dep = dependency('spandsp', version : '>= 0.0.6', required : get_option('spandsp'))
if spandsp_dep.found()
gstspandsp = library('gstspandsp',
diff --git a/ext/srt/meson.build b/ext/srt/meson.build
index d9ca1d503..0f328ccb9 100644
--- a/ext/srt/meson.build
+++ b/ext/srt/meson.build
@@ -7,12 +7,18 @@ srt_sources = [
'gstsrtclientsink.c',
'gstsrtserversink.c',
]
+srt_option = get_option('srt')
+if srt_option.disabled()
+ subdir_done()
+endif
srt_dep = dependency('srt', required : false)
-
if not srt_dep.found() and cc.has_header_symbol('srt/srt.h', 'srt_startup')
srt_dep = cc.find_library('srt', required : false)
endif
+if not srt_dep.found() and srt_option.enabled()
+ error('srt plugin enabled, but srt library not found')
+endif
if srt_dep.found()
gstsrt = library('gstsrt',
diff --git a/ext/srtp/meson.build b/ext/srtp/meson.build
index a818b38b4..0a296869a 100644
--- a/ext/srtp/meson.build
+++ b/ext/srtp/meson.build
@@ -5,6 +5,9 @@ srtp_sources = [
]
srtp_cargs = []
+if get_option('srtp').disabled()
+ subdir_done()
+endif
srtp_dep = dependency('libsrtp2', version : '>= 2.1.0', required : false)
if srtp_dep.found()
@@ -15,6 +18,9 @@ else
srtp_dep = cc.find_library('srtp', required : false)
endif
endif
+if not srtp_dep.found() and get_option('srtp').enabled()
+ error('srtp plugin enabled but libsrtp not found')
+endif
if srtp_dep.found()
gstsrtp_enums = gnome.mkenums_simple('gstsrtp-enumtypes',
diff --git a/ext/ttml/meson.build b/ext/ttml/meson.build
index 08898951d..a62fa283e 100644
--- a/ext/ttml/meson.build
+++ b/ext/ttml/meson.build
@@ -1,9 +1,7 @@
-libxml_dep = dependency('libxml-2.0', version : '>= 2.9.2', required : false)
-pango_dep = dependency('pango', required : false)
-cairo_dep = dependency('cairo', required : false)
-pangocairo_dep = dependency('pangocairo', required : false)
-cc = meson.get_compiler('c')
-m_dep = cc.find_library('m', required : false)
+libxml_dep = dependency('libxml-2.0', version : '>= 2.9.2', required : get_option('ttml'))
+pango_dep = dependency('pango', required : get_option('ttml'))
+cairo_dep = dependency('cairo', required : get_option('ttml'))
+pangocairo_dep = dependency('pangocairo', required : get_option('ttml'))
if libxml_dep.found() and pango_dep.found() and cairo_dep.found() and pangocairo_dep.found()
gstttmlsubs = library('gstttmlsubs',
@@ -15,7 +13,7 @@ if libxml_dep.found() and pango_dep.found() and cairo_dep.found() and pangocairo
'gstttmlplugin.c'],
c_args : gst_plugins_bad_args,
include_directories : [configinc],
- dependencies : [gstvideo_dep, libxml_dep, pango_dep, cairo_dep, pangocairo_dep, m_dep],
+ dependencies : [gstvideo_dep, libxml_dep, pango_dep, cairo_dep, pangocairo_dep, libm],
install : true,
install_dir : plugins_install_dir,
)
diff --git a/ext/voaacenc/meson.build b/ext/voaacenc/meson.build
index 16f3e48b5..72835b470 100644
--- a/ext/voaacenc/meson.build
+++ b/ext/voaacenc/meson.build
@@ -1,6 +1,6 @@
voaac_sources = ['gstvoaac.c', 'gstvoaacenc.c']
-voaac_dep = dependency('vo-aacenc', required : false)
+voaac_dep = dependency('vo-aacenc', required : get_option('voaacenc'))
if voaac_dep.found()
gstbz2 = library('gstvoaacenc',
diff --git a/ext/vulkan/meson.build b/ext/vulkan/meson.build
index 873cfbb3d..8c9844cd1 100644
--- a/ext/vulkan/meson.build
+++ b/ext/vulkan/meson.build
@@ -20,15 +20,22 @@ vulkan_sources = [
vulkan_defines = []
optional_deps = []
+if get_option('vulkan').disabled()
+ subdir_done()
+endif
-vulkan_dep = cc.find_library('vulkan', required : false)
+vulkan_dep = cc.find_library('vulkan', required : get_option('vulkan'))
has_vulkan_header = cc.has_header('vulkan/vulkan.h')
+if not has_vulkan_header and get_option('vulkan').enabled()
+ error('vulkan plugin enabled, but vulkan.h not found')
+endif
+
if vulkan_dep.found() and has_vulkan_header
have_vulkan_windowing = false
vkconf = configuration_data()
- xcb_dep = dependency('xcb', version : '>=1.10', required : false)
+ xcb_dep = dependency('xcb', version : '>=1.10', required : get_option('x11'))
if xcb_dep.found()
vulkan_sources += [
'xcb/vkdisplay_xcb.c',
@@ -41,7 +48,7 @@ if vulkan_dep.found() and has_vulkan_header
vkconf.set10('GST_VULKAN_HAVE_WINDOW_XCB', 1)
endif
- wayland_client_dep = dependency('wayland-client', version : '>=1.4', required : false)
+ wayland_client_dep = dependency('wayland-client', version : '>=1.4', required : get_option('wayland'))
if wayland_client_dep.found()
vulkan_sources += [
'wayland/vkdisplay_wayland.c',
diff --git a/ext/webp/meson.build b/ext/webp/meson.build
index fab742c3f..f429e76c8 100644
--- a/ext/webp/meson.build
+++ b/ext/webp/meson.build
@@ -4,7 +4,7 @@ webp_sources = [
'gstwebpenc.c',
]
-webp_dep = dependency('libwebp', version : '>= 0.2.1', required : false)
+webp_dep = dependency('libwebp', version : '>= 0.2.1', required : get_option('webp'))
if webp_dep.found()
gstwebp = library('gstwebp',
diff --git a/ext/webrtc/meson.build b/ext/webrtc/meson.build
index f098a40ce..1d64aa943 100644
--- a/ext/webrtc/meson.build
+++ b/ext/webrtc/meson.build
@@ -13,7 +13,7 @@ webrtc_sources = [
'webrtctransceiver.c',
]
-libnice_dep = dependency('nice', version : '>=0.1.14', required : false,
+libnice_dep = dependency('nice', version : '>=0.1.14', required : get_option('webrtc'),
fallback : ['libnice', 'libnice_dep'],
default_options: ['tests=false'])
diff --git a/ext/webrtcdsp/meson.build b/ext/webrtcdsp/meson.build
index a5c47841b..9d02a7faf 100644
--- a/ext/webrtcdsp/meson.build
+++ b/ext/webrtcdsp/meson.build
@@ -3,7 +3,8 @@ webrtc_sources = [
'gstwebrtcechoprobe.cpp'
]
-webrtc_dep = dependency('webrtc-audio-processing', version : ['>= 0.2', '< 0.4'], required : false)
+webrtc_dep = dependency('webrtc-audio-processing', version : ['>= 0.2', '< 0.4'],
+ required : get_option('webrtcdsp'))
if webrtc_dep.found()
gstwebrtcdsp = library('gstwebrtcdsp',
diff --git a/ext/x265/meson.build b/ext/x265/meson.build
index 249a6539d..37c98f9d7 100644
--- a/ext/x265/meson.build
+++ b/ext/x265/meson.build
@@ -1,4 +1,4 @@
-x265_dep = dependency('x265', required: false)
+x265_dep = dependency('x265', required: get_option('x265'))
if x265_dep.found()
gstx265 = library('gstx265',
'gstx265enc.c',
diff --git a/ext/zbar/meson.build b/ext/zbar/meson.build
index 6371c2c2a..4360abc12 100644
--- a/ext/zbar/meson.build
+++ b/ext/zbar/meson.build
@@ -1,4 +1,4 @@
-zbar_dep = dependency('zbar', version : '>= 0.9', required : false)
+zbar_dep = dependency('zbar', version : '>= 0.9', required : get_option('zbar'))
if zbar_dep.found()
gstzbar = library('gstzbar',
'gstzbar.c',