mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
msdk: Fixes for meson include directory setup
In case of pkg-config we need to create the include directories object from the path using include_directories(). For INTELMEDIASDKROOT or MFX_HOME we need to add the alternate include path ./include/mfx as Intel MediaSDK now puts the headers there.
This commit is contained in:
parent
1569c33f24
commit
3ecd8666d9
1 changed files with 3 additions and 1 deletions
|
@ -42,6 +42,7 @@ endif
|
||||||
mfx_dep = dependency('libmfx', required: false)
|
mfx_dep = dependency('libmfx', required: false)
|
||||||
if mfx_dep.found()
|
if mfx_dep.found()
|
||||||
mfx_incdir = mfx_dep.get_pkgconfig_variable('includedir')
|
mfx_incdir = mfx_dep.get_pkgconfig_variable('includedir')
|
||||||
|
mfx_inc = []
|
||||||
else
|
else
|
||||||
# Old versions of MediaSDK don't provide a pkg-config file
|
# Old versions of MediaSDK don't provide a pkg-config file
|
||||||
mfx_root = run_command(python3, '-c', 'import os; print(os.environ.get("INTELMEDIASDKROOT", os.environ.get("MFX_HOME", "")))').stdout().strip()
|
mfx_root = run_command(python3, '-c', 'import os; print(os.environ.get("INTELMEDIASDKROOT", os.environ.get("MFX_HOME", "")))').stdout().strip()
|
||||||
|
@ -69,6 +70,7 @@ endif
|
||||||
# Old versions of MediaSDK don't have the 'mfx' directory prefix
|
# Old versions of MediaSDK don't have the 'mfx' directory prefix
|
||||||
if cxx.has_header('mfx/mfxdefs.h', args: '-I' + mfx_incdir)
|
if cxx.has_header('mfx/mfxdefs.h', args: '-I' + mfx_incdir)
|
||||||
mfx_incdir = join_paths([mfx_incdir, 'mfx'])
|
mfx_incdir = join_paths([mfx_incdir, 'mfx'])
|
||||||
|
mfx_inc = include_directories(mfx_incdir)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if cxx.has_header('mfxvp9.h', args: '-I' + mfx_incdir)
|
if cxx.has_header('mfxvp9.h', args: '-I' + mfx_incdir)
|
||||||
|
@ -96,7 +98,7 @@ if msdk_deps_found
|
||||||
gstmsdktag = library('gstmsdk',
|
gstmsdktag = library('gstmsdk',
|
||||||
msdk_sources,
|
msdk_sources,
|
||||||
c_args : gst_plugins_bad_args,
|
c_args : gst_plugins_bad_args,
|
||||||
include_directories : [configinc, mfx_incdir],
|
include_directories : [configinc, mfx_inc],
|
||||||
dependencies : [gstbase_dep, gstvideo_dep, gstpbutils_dep, gstallocators_dep, mfx_dep, msdk_deps],
|
dependencies : [gstbase_dep, gstvideo_dep, gstpbutils_dep, gstallocators_dep, mfx_dep, msdk_deps],
|
||||||
install : true,
|
install : true,
|
||||||
install_dir : plugins_install_dir,
|
install_dir : plugins_install_dir,
|
||||||
|
|
Loading…
Reference in a new issue