aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/meson.build35
1 files changed, 10 insertions, 25 deletions
diff --git a/examples/meson.build b/examples/meson.build
index 869384c2..4a6d1634 100644
--- a/examples/meson.build
+++ b/examples/meson.build
@@ -1,10 +1,10 @@
threads = dependency('threads')
wayland_cursor = dependency('wayland-cursor')
-libpng = dependency('libpng', required: false)
+libpng = dependency('libpng', required: false, disabler: true)
# These versions correspond to ffmpeg 4.0
-libavutil = dependency('libavutil', version: '>=56.14.100', required: false)
-libavcodec = dependency('libavcodec', version: '>=58.18.100', required: false)
-libavformat = dependency('libavformat', version: '>=58.12.100', required: false)
+libavutil = dependency('libavutil', version: '>=56.14.100', required: false, disabler: true)
+libavcodec = dependency('libavcodec', version: '>=58.18.100', required: false, disabler: true)
+libavformat = dependency('libavformat', version: '>=58.12.100', required: false, disabler: true)
# epoll is a separate library in FreeBSD
if host_machine.system() == 'freebsd'
@@ -13,13 +13,6 @@ else
libepoll = []
endif
-# Small hack until https://github.com/mesonbuild/meson/pull/3386/ is merged
-foreach dep : ['libpng', 'libavutil', 'libavcodec', 'libavformat']
- if not get_variable(dep).found()
- set_variable(dep, disabler())
- endif
-endforeach
-
# Check if libavutil is found because of https://github.com/mesonbuild/meson/issues/6010
if libavutil.found() and not cc.has_header('libavutil/hwcontext_drm.h', dependencies: libavutil)
libavutil = disabler()
@@ -121,18 +114,10 @@ examples = {
}
foreach name, info : examples
- all_dep_found = true
- foreach d : info.get('dep')
- all_dep_found = all_dep_found and d.found()
- endforeach
- if all_dep_found
- executable(
- name,
- info.get('src'),
- dependencies: info.get('dep'),
- build_by_default: get_option('examples'),
- )
- else
- warning('Dependencies not satisfied for ' + name)
- endif
+ executable(
+ name,
+ info.get('src'),
+ dependencies: info.get('dep'),
+ build_by_default: get_option('examples'),
+ )
endforeach