From 838efcb58cbe08ca31dedbda9a140f4968dd7d29 Mon Sep 17 00:00:00 2001 From: Marius Vlad Date: Wed, 6 Jan 2021 19:14:12 +0200 Subject: meson.build: Fix building with cross SDK For some time now, yocto/OE no longer builds all weston back-ends, which means the X11 is no longer supported on AGL platform. The agl-compositor can be built, assuming all dependencies have been satisfied, without the need of having an AGL or yocto/OE environment, but so far, I've never tried using SDK directly. This patch should allow building the compositor, by only using the AGL SDK, and instead of using the local pkg-config, only use what is available in the SDK sysroot. This takes care of assuming that X11 back-end is available, when in reality, in the AGL SDK platform that is not the case. Signed-off-by: Marius Vlad Change-Id: Ia2a182b9c3015f14f82043a04e83e917cd99bf6f --- meson.build | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index bd4cb04..e0ec2ae 100644 --- a/meson.build +++ b/meson.build @@ -190,9 +190,14 @@ endif # '-I/extra/include/dir, but this should only be used in exceptional cases for # includes that can't be detected via pkg-config and passed via dependencies. if libweston_dep.found() - if not prefix_path.contains('/usr') - dir_path_x11_backend = join_paths(prefix_path, 'include', libweston_version, 'libweston', 'backend-x11.h') + if not meson.is_cross_build() + if not prefix_path.contains('/usr') + dir_path_x11_backend = join_paths(prefix_path, 'include', libweston_version, 'libweston', 'backend-x11.h') + else + dir_path_x11_backend = join_paths(libweston_version, 'libweston', 'backend-x11.h') + endif else + message('Building with cross environment') dir_path_x11_backend = join_paths(libweston_version, 'libweston', 'backend-x11.h') endif -- cgit 1.2.3-korg