You've already forked libmali-rockchip
mirror of
https://github.com/armbian/libmali-rockchip.git
synced 2026-01-06 12:03:41 -08:00
meson: Force MESA_EGL_NO_X11_HEADER for non-x11 winsys
Not all users would use the cflags from pkgconfig. Change-Id: If66570b4fba51c70f2e01bd4911714d78b7a8b7e Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
This commit is contained in:
10
fixup_nox11.sh
Executable file
10
fixup_nox11.sh
Executable file
@@ -0,0 +1,10 @@
|
||||
#!/bin/sh -e
|
||||
|
||||
[ $# -lt 1 ] && {
|
||||
echo "usage: $0 <path of eglplatform.h>"
|
||||
exit 1
|
||||
}
|
||||
|
||||
HEADER="${MESON_INSTALL_DESTDIR_PREFIX:-/usr}/$1"
|
||||
|
||||
sed -i 's/MESA_EGL_NO_X11_HEADERS/__unix__/g' "$HEADER"
|
||||
12
meson.build
12
meson.build
@@ -194,7 +194,6 @@ foreach name, values : map
|
||||
wrapper_libs = values[1]
|
||||
headers = values[2]
|
||||
pkg_version = values[3]
|
||||
mali_cflags = []
|
||||
wrapper_ldflags = []
|
||||
is_opencl_icd = opencl_icd and name == 'OpenCL'
|
||||
|
||||
@@ -202,10 +201,6 @@ foreach name, values : map
|
||||
continue
|
||||
endif
|
||||
|
||||
if name == 'egl' and platform != 'x11'
|
||||
mali_cflags += '-DMESA_EGL_NO_X11_HEADERS'
|
||||
endif
|
||||
|
||||
foreach wrapper, version : wrapper_libs
|
||||
wrapper_ldflags += '-l' + wrapper
|
||||
|
||||
@@ -247,7 +242,6 @@ foreach name, values : map
|
||||
pkgconfig.generate(
|
||||
libraries : ['-L${libdir} -lmali', wrapper_ldflags],
|
||||
requires : requires,
|
||||
extra_cflags : mali_cflags,
|
||||
version : pkg_version,
|
||||
name : name,
|
||||
description : 'Mali GPU User-Space Binary Driver Wrappers')
|
||||
@@ -293,3 +287,9 @@ if not wrappers
|
||||
# Fixup wrappers
|
||||
meson.add_install_script('fixup_wrappers.sh', get_option('libdir'))
|
||||
endif
|
||||
|
||||
if platform != 'x11'
|
||||
# Fixup EGL header
|
||||
meson.add_install_script('fixup_nox11.sh',
|
||||
get_option('includedir') / 'EGL' / 'eglplatform.h')
|
||||
endif
|
||||
|
||||
Reference in New Issue
Block a user