meson: add build files for msdk

https://bugzilla.gnome.org/show_bug.cgi?id=770990
This commit is contained in:
Scott D Phillips 2016-10-13 14:30:43 -07:00 committed by Josep Torra
parent 35f76fc33a
commit 8949c12aaf
2 changed files with 33 additions and 0 deletions

View file

@ -16,6 +16,7 @@ subdir('dvb')
#subdir('dxr3') #subdir('dxr3')
#subdir('fbdev') #subdir('fbdev')
#subdir('linsys') #subdir('linsys')
subdir('msdk')
#subdir('nvenc') #subdir('nvenc')
#subdir('opensles') #subdir('opensles')
#subdir('pvr2d') #subdir('pvr2d')

32
sys/msdk/meson.build Normal file
View file

@ -0,0 +1,32 @@
msdk_sources = [
'gstmsdk.c',
'gstmsdkenc.c',
'gstmsdkh264enc.c',
'gstmsdkh265enc.c',
'gstmsdkmpeg2enc.c',
'gstmsdkvp8enc.c',
'msdk_libva.c',
]
python3 = find_program('python3')
msdk_root = run_command(python3, '-c', 'import os; print(os.environ.get("INTELMEDIASDKROOT", os.environ.get("MFX_HOME", "")))').stdout().strip()
if msdk_root != ''
msdk_libdir = msdk_root + '/lib/lin_x64'
msdk_incdir = include_directories(msdk_root + '/include')
msdk_lib = cc.find_library('mfx', dirs: msdk_libdir, required: false)
libva_dep = dependency('libva-drm', required: false)
libdl_dep = cc.find_library('dl', required: false)
msdk_dep = declare_dependency(include_directories: msdk_incdir, dependencies: [msdk_lib, libva_dep, libdl_dep])
if msdk_lib.found() and libva_dep.found() and libdl_dep.found()
gstmsdktag = library('gstmsdk',
msdk_sources,
c_args : gst_plugins_bad_args,
include_directories : [configinc],
dependencies : [gstbase_dep, gstvideo_dep, gstpbutils_dep, msdk_dep],
install : true,
install_dir : plugins_install_dir,
)
endif
endif