diff options
author | Marius Vlad <marius.vlad@collabora.com> | 2021-09-27 18:23:58 +0300 |
---|---|---|
committer | Marius Vlad <marius.vlad@collabora.com> | 2021-09-28 00:14:44 +0300 |
commit | e5016cbc47b46b86a50d9a6ca71269a62664efbe (patch) | |
tree | aacf59489227e3ea54cc199acf953aaca50767c4 /meson.build | |
parent | d6f64b665a39e0bde2fe5d5b79a0274f734b2c6e (diff) |
meson.build: Conditionally build with headless support
This allow to build the compositor without headless support, just in
case libweston wasn't built with it.
Bug-AGL: SPEC-4087
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: Ie848d842ace06b21371de6f70ad18600927f8044
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/meson.build b/meson.build index f8e97a5..d953fe3 100644 --- a/meson.build +++ b/meson.build @@ -203,17 +203,26 @@ if libweston_dep.found() 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') + dir_path_headless_backend = join_paths(prefix_path, 'include', libweston_version, 'libweston', 'backend-headless.h') else dir_path_x11_backend = join_paths(libweston_version, 'libweston', 'backend-x11.h') + dir_path_x11_backend = join_paths(libweston_version, 'libweston', 'backend-headless.h') endif else message('Building with cross environment') dir_path_x11_backend = join_paths(libweston_version, 'libweston', 'backend-x11.h') + dir_path_headless_backend = join_paths(libweston_version, 'libweston', 'backend-headless.h') endif # do the test if cc.has_header(dir_path_x11_backend) config_h.set('HAVE_BACKEND_X11', 1) + message('Building with X11 backend') + endif + + if cc.has_header(dir_path_headless_backend) + config_h.set('HAVE_BACKEND_HEADLESS', 1) + message('Building with headless backend') endif endif |