meson: Only define MESA_EGL_NO_X11_HEADERS in egl.pc

Change-Id: Ice8738a592b85a504355611c4c6096d694b0afcd
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
This commit is contained in:
Jeffy Chen 2020-08-13 09:45:02 +08:00
parent e2ba144401
commit d7695f4218

View file

@ -100,11 +100,6 @@ map = {
'OpenCL' : ['clCreateContext', cl_wrappers, cl_headers, '1.2'],
}
mali_cflags = []
if platform != 'x11'
mali_cflags += '-DMESA_EGL_NO_X11_HEADERS'
endif
# Create dummy source for building libraries
run_command('touch', join_paths(meson.current_build_dir(), 'dummy.c'))
@ -120,12 +115,17 @@ foreach name, values : map
wrappers = values[1]
headers = values[2]
pkg_version = values[3]
mali_cflags = []
# TODO: Use readelf -s ?
if run_command('grep', '-q', symbol, default_lib).returncode() != 0
continue
endif
if name == 'egl' and platform != 'x11'
mali_cflags += '-DMESA_EGL_NO_X11_HEADERS'
endif
foreach wrapper, version : wrappers
shared_library(
wrapper,