summaryrefslogtreecommitdiff
path: root/ext/opencv
diff options
context:
space:
mode:
authorLuis de Bethencourt <luisbg@osg.samsung.com>2016-11-15 16:57:20 +0000
committerLuis de Bethencourt <luisbg@osg.samsung.com>2016-11-26 17:55:23 +0000
commitde99cf0de1fb332b2e757d027ec8c35eb1ac5811 (patch)
tree1706b51107b61efa41b36a23959787a2817bee6b /ext/opencv
parent555c4eb1b293626b0020b35360dba3cd2d3f2a29 (diff)
downloadgstreamer-plugins-bad-de99cf0de1fb332b2e757d027ec8c35eb1ac5811.tar.gz
opencv: Enable in meson build
https://bugzilla.gnome.org/show_bug.cgi?id=774223
Diffstat (limited to 'ext/opencv')
-rw-r--r--ext/opencv/meson.build50
1 files changed, 50 insertions, 0 deletions
diff --git a/ext/opencv/meson.build b/ext/opencv/meson.build
new file mode 100644
index 000000000..01bb64019
--- /dev/null
+++ b/ext/opencv/meson.build
@@ -0,0 +1,50 @@
+opencv_sources = [
+ 'gstcvdilate.cpp',
+ 'gstcvdilateerode.cpp',
+ 'gstcvequalizehist.cpp',
+ 'gstcverode.cpp',
+ 'gstcvlaplace.cpp',
+ 'gstcvsmooth.cpp',
+ 'gstcvsobel.cpp',
+ 'gstdisparity.cpp',
+ 'gstedgedetect.cpp',
+ 'gstfaceblur.cpp',
+ 'gstfacedetect.cpp',
+ 'gstgrabcut.cpp',
+ 'gsthanddetect.cpp',
+ 'gstmotioncells.cpp',
+ 'gstopencv.cpp',
+ 'gstretinex.cpp',
+ 'gstsegmentation.cpp',
+ 'gstskindetect.cpp',
+ 'gsttemplatematch.cpp',
+ 'gsttextoverlay.cpp',
+ 'MotionCells.cpp',
+ 'motioncells_wrapper.cpp'
+]
+
+opencv_cargs = ['-DGST_HAAR_CASCADES_DIR="@0@"']
+runcmd = run_command('pkg-config', '--variable=prefix', 'opencv')
+if runcmd.returncode() == 0
+ opencv_cargs += '-DOPENCV_PREFIX="' + runcmd.stdout().strip() + '"'
+endif
+
+r = run_command('test', '-d', '/usr/share/opencv')
+if r.returncode() == 0
+ opencv_cargs += '-DOPENCV_PATH_NAME="opencv"'
+else
+ opencv_cargs += '-DOPENCV_PATH_NAME="OpenCv"'
+endif
+
+opencv_dep = dependency('opencv', version : '>= 2.3.0')
+if opencv_dep.found()
+ gstopencv = library('gstopencv',
+ opencv_sources,
+ cpp_args : gst_plugins_bad_args + opencv_cargs + [ '-DGST_USE_UNSTABLE_API' ],
+ link_args : noseh_link_args,
+ include_directories : [configinc],
+ dependencies : [gstbase_dep, gstvideo_dep, opencv_dep, gstopencv_dep],
+ install : true,
+ install_dir : plugins_install_dir,
+ )
+endif