From c5d1ac1c14eb11c2f3dec3fc36705df2ca7388ac Mon Sep 17 00:00:00 2001 From: Witold Filipczyk Date: Mon, 5 Jul 2021 14:28:25 +0200 Subject: [PATCH] [meson] Fix build with -Dlibev=true --- meson.build | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/meson.build b/meson.build index c49bfb95..d2c0dab6 100644 --- a/meson.build +++ b/meson.build @@ -214,7 +214,15 @@ if conf_data.get('CONFIG_TRE') deps += tredeps endif -if conf_data.get('CONFIG_LIBEVENT') +eh = '' +if conf_data.get('CONFIG_LIBEV') + conf_data.set('HAVE_LIBEV_EVENT_H', compiler.has_header('libev/event.h')) + conf_data.set('HAVE_LIBEV', true) + eh = '#include ' + eventdeps = compiler.find_library('ev') + deps += eventdeps +elif conf_data.get('CONFIG_LIBEVENT') + eh = '#include ' eventdeps = dependency('libevent') deps += eventdeps conf_data.set('HAVE_LIBEVENT', true) @@ -333,14 +341,7 @@ if conf_data.get('CONFIG_FSP') deps += fspdeps endif -eh = '' -if conf_data.get('CONFIG_LIBEV') - conf_data.set('HAVE_LIBEV_EVENT_H', compiler.has_header('libev/event.h')) - eh = '#include ' -elif conf_data.get('CONFIG_LIBEVENT') - eh = '#include ' -endif if compiler.has_header('sys/un.h') conf_data.set('CONFIG_INTERLINK', true)