file_watch: only use inotify on linux

Fixes build on *BSD platforms.

Fixes #262, Closes #261

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
Yuxuan Shui
2019-11-11 20:46:06 +00:00
parent a1e6686455
commit 7328b3f891
2 changed files with 28 additions and 5 deletions

View File

@@ -78,6 +78,14 @@ if get_option('unittest')
cflags += ['-DUNIT_TEST']
endif
host_system = host_machine.system()
if host_system == 'linux'
cflags += ['-DHAS_INOTIFY']
elif host_system == 'freebsd' or host_system == 'netbsd' or
host_system == 'dragonfly' or host_system == 'openbsd'
cflags += ['-DHAS_KQUEUE']
endif
subdir('backend')
picom = executable('picom', srcs, c_args: cflags,