summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2019-01-19 23:53:56 +0530
committerNirbheek Chauhan <nirbheek.chauhan@gmail.com>2019-01-19 18:28:42 +0000
commitf710b36ac4935bd6123df15a191c1fe089c4c233 (patch)
tree2a4e3429fbfc82a2dc34f48e3b8e8cb9503d8b0b
parent7ffcab34780fbc077b52cb577d8973d9fbe85e5a (diff)
downloadgstreamer-plugins-bad-f710b36ac4935bd6123df15a191c1fe089c4c233.tar.gz
meson: Fix automagic build of msdk plugin
When building the msdk plugin even if libmfx is found, unless the plugin is explicitly enabled we should not error out if msdk dependencies are not found. Also give an error message when we don't build the plugin on Windows because we're not building with MSVC.
-rw-r--r--sys/msdk/meson.build13
1 files changed, 8 insertions, 5 deletions
diff --git a/sys/msdk/meson.build b/sys/msdk/meson.build
index c94102d38..e1ca58218 100644
--- a/sys/msdk/meson.build
+++ b/sys/msdk/meson.build
@@ -70,14 +70,17 @@ if cxx.has_header('mfxvp9.h', args: '-I' + mfx_incdir)
endif
if host_machine.system() == 'windows'
- legacy_stdio_dep = cc.find_library('legacy_stdio_definitions', required: true)
- d3d11_dep = cc.find_library('d3d11', required: true)
+ if cc.get_id() != 'msvc' and msdk_option.enabled()
+ error('msdk plugin can only be built with MSVC')
+ endif
+ legacy_stdio_dep = cc.find_library('legacy_stdio_definitions', required: get_option('msdk'))
+ d3d11_dep = cc.find_library('d3d11', required: get_option('msdk'))
msdk_deps = declare_dependency(dependencies: [d3d11_dep, legacy_stdio_dep])
msdk_deps_found = d3d11_dep.found() and legacy_stdio_dep.found() and cc.get_id() == 'msvc'
else
- libva_dep = dependency('libva-drm', required: true)
- libdl_dep = cc.find_library('dl', required: true)
- libgudev_dep = dependency('gudev-1.0', required: true)
+ libva_dep = dependency('libva-drm', required: get_option('msdk'))
+ libdl_dep = cc.find_library('dl', required: get_option('msdk'))
+ libgudev_dep = dependency('gudev-1.0', required: get_option('msdk'))
msdk_deps = declare_dependency(dependencies: [libva_dep, libdl_dep, libgudev_dep])
msdk_deps_found = libva_dep.found() and libdl_dep.found() and libgudev_dep.found()
endif