msdk: add support for open sourced MediaSDK

MediaSDK has been released as open source [1], but the directories
where it installs its files, are different from the binary only
distribution.

This patch adds to the libraries path the directory /lib. Also it
is defined in meson if the include directory has the mfx/ prefix,
something that is already handled in autotools.

1. https://github.com/Intel-Media-SDK/MediaSDK
This commit is contained in:
Víctor Manuel Jáquez Leal 2018-11-22 17:02:09 +01:00
parent 9ad618e487
commit eaa1bd93e8

View file

@ -45,8 +45,11 @@ if msdk_root == '' and msdk_option.enabled()
endif
if msdk_root != ''
msdk_libdir = [msdk_root + '/lib/lin_x64', msdk_root + '/lib/x64', msdk_root + '/lib64']
msdk_libdir = [msdk_root + '/lib/lin_x64', msdk_root + '/lib/x64', msdk_root + '/lib64', msdk_root + '/lib']
msdk_incdir = include_directories(msdk_root + '/include')
if cxx.has_header('mfx/mfxdefs.h', args: '-I' + msdk_root + '/include')
cdata.set('HAVE_MFX_MFXDEFS_H', 1)
endif
msdk_lib = cxx.find_library('mfx', dirs: msdk_libdir, required: msdk_option)
if host_machine.system() == 'windows'
legacy_stdio_dep = cc.find_library('legacy_stdio_definitions', required: msdk_option)