Commit f710b36a authored by Nirbheek Chauhan's avatar Nirbheek Chauhan 🐜 Committed by Nirbheek Chauhan

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.
parent 7ffcab34
Pipeline #15591 passed with stages
in 18 minutes and 25 seconds
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment