diff options
author | Seungha Yang <seungha@centricular.com> | 2020-10-23 22:40:41 +0900 |
---|---|---|
committer | Seungha Yang <seungha@centricular.com> | 2020-11-10 23:32:50 +0900 |
commit | 062a4c27a4242720c4b33346f6cff2c887e03b4d (patch) | |
tree | b538528829fa47c477e6cd3ec24cfd51d93a894d | |
parent | 65b09be8926c862daf02896b9c8742292052f175 (diff) |
meson: Check cairo-png dependency
Should check whether libpng dependent methods are available or not
Fixes: https://gitlab.freedesktop.org/gstreamer/gst-build/-/issues/128
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-devtools/-/merge_requests/225>
-rw-r--r-- | validate/gst-libs/gst/video/meson.build | 10 | ||||
-rw-r--r-- | validate/plugins/ssim/meson.build | 6 | ||||
-rw-r--r-- | validate/tools/meson.build | 7 |
3 files changed, 15 insertions, 8 deletions
diff --git a/validate/gst-libs/gst/video/meson.build b/validate/gst-libs/gst/video/meson.build index f70594d..c4a84da 100644 --- a/validate/gst-libs/gst/video/meson.build +++ b/validate/gst-libs/gst/video/meson.build @@ -1,4 +1,6 @@ -cairo_dep = dependency('cairo', required: false) +validate_video_dep = dependency('', required: false) +cairo_dep = dependency('cairo-png', required: false, fallback: 'cairo') + if cairo_dep.found() video = static_library( 'gstvalidatevideo', @@ -7,4 +9,10 @@ if cairo_dep.found() dependencies : [gst_dep, gst_video_dep, gst_pbutils_dep, glib_dep, cairo_dep, gio_dep, mathlib], ) + validate_video_dep = declare_dependency( + link_with : video, + include_directories : inc_dirs, + dependencies : [gst_dep, gst_video_dep, gst_pbutils_dep, glib_dep, cairo_dep, gio_dep, + mathlib], + ) endif diff --git a/validate/plugins/ssim/meson.build b/validate/plugins/ssim/meson.build index a6bf773..5562e41 100644 --- a/validate/plugins/ssim/meson.build +++ b/validate/plugins/ssim/meson.build @@ -1,9 +1,9 @@ -if cairo_dep.found() +if validate_video_dep.found() shared_library('gstvalidatessim', 'gstvalidatessim.c', include_directories : inc_dirs, - link_with: [video, gstvalidate], - dependencies : [gst_dep, gst_video_dep, glib_dep, cairo_dep, + link_with: [gstvalidate], + dependencies : [gst_dep, gst_video_dep, glib_dep, validate_video_dep, gst_pbutils_dep], install : true, install_dir : validate_plugins_install_dir, diff --git a/validate/tools/meson.build b/validate/tools/meson.build index 0777253..b647793 100644 --- a/validate/tools/meson.build +++ b/validate/tools/meson.build @@ -44,14 +44,13 @@ if rtsp_server_dep.found() ) endif -if cairo_dep.found() +if validate_video_dep.found() executable('gst-validate-images-check-' + apiversion, 'gst-validate-images-check.c', install: true, include_directories : inc_dirs, - dependencies : validate_dep, - c_args : [gst_c_args], - link_with: [video], + dependencies : [validate_dep, validate_video_dep], + c_args : [gst_c_args] ) endif |