From 86588fbdebe7f6ac9363d98f524e4ae14bd4b019 Mon Sep 17 00:00:00 2001 From: Francesco Guastella Date: Thu, 7 Sep 2023 08:20:20 +0200 Subject: [PATCH] build: define tests in egl/meson.build when the 'tests' option is enabled Signed-off-by: Francesco Guastella --- egl/meson.build | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/egl/meson.build b/egl/meson.build index c512377..76c6ee2 100644 --- a/egl/meson.build +++ b/egl/meson.build @@ -9,19 +9,21 @@ wayland_egl = library( install: true ) -wayland_egl_abi_check = executable('wayland-egl-abi-check', 'wayland-egl-abi-check.c') -test('wayland-egl abi check', wayland_egl_abi_check) +if get_option('tests') + wayland_egl_abi_check = executable('wayland-egl-abi-check', 'wayland-egl-abi-check.c') + test('wayland-egl abi check', wayland_egl_abi_check) -nm_path = find_program('nm').full_path() + nm_path = find_program('nm').full_path() -test( - 'wayland-egl symbols check', - find_program('wayland-egl-symbols-check'), - env: [ - 'WAYLAND_EGL_LIB=@0@'.format(wayland_egl.full_path()), - 'NM=@0@'.format(nm_path) - ] -) + test( + 'wayland-egl symbols check', + find_program('wayland-egl-symbols-check'), + env: [ + 'WAYLAND_EGL_LIB=@0@'.format(wayland_egl.full_path()), + 'NM=@0@'.format(nm_path) + ] + ) +endif install_headers([ 'wayland-egl.h',