summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/opencv/meson.build33
-rw-r--r--ext/webrtcdsp/meson.build9
-rw-r--r--meson.build2
3 files changed, 15 insertions, 29 deletions
diff --git a/ext/opencv/meson.build b/ext/opencv/meson.build
index aa55d1433..7d9125cb7 100644
--- a/ext/opencv/meson.build
+++ b/ext/opencv/meson.build
@@ -40,47 +40,38 @@ libopencv3_headers = [
gstopencv_cargs = ['-DGST_HAAR_CASCADES_DIR="@0@"']
-# First, check for the upper version limit and ensure it isn't found
-# FIXME: When 0.37.0 is released, change this to use many-version-conditions
-opencv3_1_dep = dependency('opencv', version : '>3.1.0', required : false)
-# Then, check if the lower version limit is found
-opencv2_dep = dependency('opencv', version : '>=2.3.0', required : false)
-opencv3_dep = dependency('opencv', version : '>= 3.0 ', required : false)
+opencv_dep = dependency('opencv', version : ['>=2.3.0', '<=3.1.0'], required : false)
-opencv2_found = false
-if opencv3_1_dep.found()
- message('OpenCV version is too new: \'' + opencv3_1_dep.version() + '\' (need <= 3.1.0)')
-elif opencv2_dep.found()
- message('OpenCV found, version is \'' + opencv2_dep.version() + '\'')
- opencv2_found = true
+if opencv_dep.found()
+ opencv_found = true
foreach h : libopencv2_headers
if not cxx.has_header(h)
message('Needed header "' + h + '" not found')
- opencv2_found = false
+ opencv_found = false
endif
endforeach
- if opencv3_dep.found()
+ if opencv_dep.version() >= '3.0.0'
foreach h : libopencv3_headers
if not cxx.has_header(h)
message('Needed header "' + h + '" not found')
- opencv2_found = false
+ opencv_found = false
endif
endforeach
endif
endif
-if opencv2_found
- opencv2_prefix = opencv2_dep.get_pkgconfig_variable('prefix')
- gstopencv_cargs += ['-DOPENCV_PREFIX="' + opencv2_prefix + '"']
+if opencv_found
+ opencv_prefix = opencv_dep.get_pkgconfig_variable('prefix')
+ gstopencv_cargs += ['-DOPENCV_PREFIX="' + opencv_prefix + '"']
# Check the data dir used by opencv for its xml data files
# Use prefix from pkg-config to be compatible with cross-compilation
- r = run_command('test', '-d', opencv2_prefix + '/share/opencv')
+ r = run_command('test', '-d', opencv_prefix + '/share/opencv')
if r.returncode() == 0
gstopencv_cargs += '-DOPENCV_PATH_NAME="opencv"'
else
- r = run_command('test', '-d', opencv2_prefix + '/share/OpenCV')
+ r = run_command('test', '-d', opencv_prefix + '/share/OpenCV')
if r.returncode() == 0
gstopencv_cargs += '-DOPENCV_PATH_NAME="OpenCv"'
else
@@ -92,7 +83,7 @@ if opencv2_found
cpp_args : gst_plugins_bad_args + gstopencv_cargs + [ '-DGST_USE_UNSTABLE_API' ],
link_args : noseh_link_args,
include_directories : [configinc],
- dependencies : [gstbase_dep, gstvideo_dep, opencv2_dep, gstopencv_dep],
+ dependencies : [gstbase_dep, gstvideo_dep, opencv_dep, gstopencv_dep],
install : true,
install_dir : plugins_install_dir,
)
diff --git a/ext/webrtcdsp/meson.build b/ext/webrtcdsp/meson.build
index 600bb1961..0bc53c5bd 100644
--- a/ext/webrtcdsp/meson.build
+++ b/ext/webrtcdsp/meson.build
@@ -3,14 +3,9 @@ webrtc_sources = [
'gstwebrtcechoprobe.cpp'
]
-webrtc_dep = dependency('webrtc-audio-processing', version : '>= 0.2', required : false)
-webrtc_max_dep = dependency('webrtc-audio-processing', version : '>= 0.4', required : false)
+webrtc_dep = dependency('webrtc-audio-processing', version : ['>= 0.2', '< 0.4'], required : false)
-if (webrtc_max_dep.found())
- message('WebRTC Audio Processing library is not API stable,'
- + ' we cannot support newer version ' + webrtc_max_dep.version()
- + ' (we only support 0.2 and 0.3)')
-elif (webrtc_dep.found())
+if webrtc_dep.found()
gstwebrtcdsp = library('gstwebrtcdsp',
webrtc_sources,
cpp_args : gst_plugins_bad_args,
diff --git a/meson.build b/meson.build
index f1d8da7be..8452bf28a 100644
--- a/meson.build
+++ b/meson.build
@@ -1,6 +1,6 @@
project('gst-plugins-bad', 'c', 'cpp',
version : '1.13.0.1',
- meson_version : '>= 0.36.0',
+ meson_version : '>= 0.40.1',
default_options : [ 'warning_level=1',
'buildtype=debugoptimized' ])