2016-11-15 16:57:20 +00:00
|
|
|
opencv_sources = [
|
|
|
|
'gstopencvutils.cpp',
|
|
|
|
'gstopencvvideofilter.cpp',
|
|
|
|
]
|
|
|
|
|
|
|
|
opencv_headers = [
|
2018-03-13 12:57:56 +00:00
|
|
|
'opencv-prelude.h',
|
2016-11-15 16:57:20 +00:00
|
|
|
'gstopencvutils.h',
|
|
|
|
'gstopencvvideofilter.h',
|
|
|
|
]
|
|
|
|
|
2019-05-05 20:11:16 +00:00
|
|
|
opencv_dep = dependency('opencv', version : '>= 3.0.0', required : false)
|
2018-11-25 15:13:28 +00:00
|
|
|
if not opencv_dep.found()
|
2019-05-05 20:11:16 +00:00
|
|
|
opencv_dep = dependency('opencv4', version : '>= 4.0.0', required : false)
|
2018-11-25 15:13:28 +00:00
|
|
|
endif
|
2016-11-15 16:57:20 +00:00
|
|
|
if opencv_dep.found()
|
|
|
|
gstopencv = library('gstopencv-' + api_version,
|
|
|
|
opencv_sources,
|
2018-09-24 10:52:22 +00:00
|
|
|
c_args : gst_plugins_bad_args + ['-DBUILDING_GST_OPENCV'],
|
2019-09-06 09:13:46 +00:00
|
|
|
cpp_args : gst_plugins_bad_args + ['-DBUILDING_GST_OPENCV'],
|
2016-11-15 16:57:20 +00:00
|
|
|
include_directories : [configinc, libsinc],
|
|
|
|
version : libversion,
|
|
|
|
soversion : soversion,
|
2018-08-31 09:07:46 +00:00
|
|
|
darwin_versions : osxversion,
|
2016-11-15 16:57:20 +00:00
|
|
|
install : true,
|
|
|
|
dependencies : [gstbase_dep, gstvideo_dep, opencv_dep],
|
|
|
|
)
|
|
|
|
|
|
|
|
gstopencv_dep = declare_dependency(link_with: gstopencv,
|
|
|
|
include_directories : [libsinc],
|
|
|
|
dependencies : [gstvideo_dep, opencv_dep])
|
2018-07-27 13:29:23 +00:00
|
|
|
|
|
|
|
install_headers(opencv_headers, subdir : 'gstreamer-1.0/gst/opencv')
|
2019-05-05 20:11:16 +00:00
|
|
|
elif get_option('opencv').enabled()
|
|
|
|
error('OpenCV support enabled but required dependencies were not found.')
|
2016-11-15 16:57:20 +00:00
|
|
|
endif
|