summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarius Vlad <marius.vlad@collabora.com>2021-01-06 19:14:12 +0200
committerMarius Vlad <marius.vlad@collabora.com>2021-01-07 00:05:43 +0200
commit838efcb58cbe08ca31dedbda9a140f4968dd7d29 (patch)
tree2aafaeda531ea62137ac821aa7d046cdfa06d713
parentc5d2c447df7c0709fbfb727254888f43cef50040 (diff)
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 <marius.vlad@collabora.com> Change-Id: Ia2a182b9c3015f14f82043a04e83e917cd99bf6f
-rw-r--r--meson.build9
1 files 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