From cfd7577e1b570b36b91dd0b0e0da4a86ae3a4292 Mon Sep 17 00:00:00 2001 From: Jan Beich Date: Fri, 9 Aug 2019 09:52:16 +0000 Subject: [PATCH] backlight: require libepoll on non-Linux ../src/modules/backlight.cpp:9:10: fatal error: 'sys/epoll.h' file not found #include ^~~~~~~~~~~~~ --- meson.build | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 0b2aa15..a8b91dc 100644 --- a/meson.build +++ b/meson.build @@ -66,6 +66,8 @@ endif add_global_arguments(cpp_args, language : 'cpp') add_global_link_arguments(cpp_link_args, language : 'cpp') +is_linux = host_machine.system() == 'linux' + thread_dep = dependency('threads') fmt = dependency('fmt', version : ['>=5.3.0'], fallback : ['fmt', 'fmt_dep']) spdlog = dependency('spdlog', version : ['>=1.3.1'], fallback : ['spdlog', 'spdlog_dep']) @@ -77,6 +79,7 @@ dbusmenu_gtk = dependency('dbusmenu-gtk3-0.4', required: get_option('dbusmenu-gt giounix = dependency('gio-unix-2.0', required: get_option('dbusmenu-gtk')) jsoncpp = dependency('jsoncpp') sigcpp = dependency('sigc++-2.0') +libepoll = dependency('epoll-shim', required: false) libnl = dependency('libnl-3.0', required: get_option('libnl')) libnlgen = dependency('libnl-genl-3.0', required: get_option('libnl')) libpulse = dependency('libpulse', required: get_option('pulseaudio')) @@ -155,7 +158,7 @@ if dbusmenu_gtk.found() ) endif -if libudev.found() +if libudev.found() and (is_linux or libepoll.found()) add_project_arguments('-DHAVE_LIBUDEV', language: 'cpp') src_files += 'src/modules/backlight.cpp' endif @@ -190,6 +193,7 @@ executable( libnlgen, libpulse, libudev, + libepoll, libmpdclient, gtk_layer_shell, tz_dep