• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1opencv_sources = [
2  'gstopencvutils.cpp',
3  'gstopencvvideofilter.cpp',
4]
5
6opencv_headers = [
7  'opencv-prelude.h',
8  'gstopencvutils.h',
9  'gstopencvvideofilter.h',
10]
11
12opencv_dep = dependency('opencv', version : '>= 3.0.0', required : false)
13if not opencv_dep.found()
14  opencv_dep = dependency('opencv4', version : '>= 4.0.0', required : false)
15endif
16if opencv_dep.found()
17  gstopencv = library('gstopencv-' + api_version,
18    opencv_sources,
19    c_args : gst_plugins_bad_args + ['-DBUILDING_GST_OPENCV'],
20    include_directories : [configinc, libsinc],
21    version : libversion,
22    soversion : soversion,
23  darwin_versions : osxversion,
24    install : true,
25    dependencies : [gstbase_dep, gstvideo_dep, opencv_dep],
26  )
27
28  gstopencv_dep = declare_dependency(link_with: gstopencv,
29    include_directories : [libsinc],
30    dependencies : [gstvideo_dep, opencv_dep])
31
32  install_headers(opencv_headers, subdir : 'gstreamer-1.0/gst/opencv')
33elif get_option('opencv').enabled()
34  error('OpenCV support enabled but required dependencies were not found.')
35endif
36