mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 16:50:47 +00:00
Bump and update for meson 0.40.1
This patch bumps the required meson to 0.40.1 as gstreamer core just did, and cleanup some code to use a feature from 0.37 that allow specifying version range when checking dependency. https://bugzilla.gnome.org/show_bug.cgi?id=780654
This commit is contained in:
parent
413406d28a
commit
60fa3cab5b
3 changed files with 15 additions and 29 deletions
|
@ -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,
|
||||
)
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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' ])
|
||||
|
||||
|
|
Loading…
Reference in a new issue