32 lines
1.1 KiB
Meson
32 lines
1.1 KiB
Meson
project('cwm', 'c', meson_version : '>=1.3.0')
|
|
|
|
srcs = ['calmwm.c', 'client.c', 'conf.c', 'group.c', 'kbfunc.c', 'menu.c', 'parse.c', 'screen.c',
|
|
'search.c', 'util.c', 'xevents.c', 'xmalloc.c', 'xutil.c']
|
|
args = []
|
|
deps = [dependency('x11'), dependency('xft'), dependency('xrandr')]
|
|
|
|
cc = meson.get_compiler('c')
|
|
if cc.has_function('pledge', prefix : '#include <unistd.h>')
|
|
args += '-DHAVE_PLEDGE'
|
|
endif
|
|
if not cc.has_function('strtonum', prefix : '#include <stdlib.h>') \
|
|
or not cc.has_define('TAILQ_FOREACH_SAFE', prefix : '#include <sys/queue.h>')
|
|
deps += dependency('libbsd-overlay')
|
|
endif
|
|
if not cc.has_header('sys/cdefs.h') or \
|
|
not cc.has_define('__dead', prefix : '#include <sys/cdefs.h>')
|
|
if cc.has_function_attribute('noreturn')
|
|
args += '"-D__dead=__attribute__((__noreturn__))"'
|
|
else
|
|
args += '-D__dead'
|
|
endif
|
|
endif
|
|
if not cc.has_define('WAIT_ANY', prefix : '#include <sys/wait.h>')
|
|
args += '"-DWAIT_ANY=(-1)"'
|
|
endif
|
|
if not cc.has_define('INFTIM', prefix : '#include <poll.h>')
|
|
args += '"-DINFTIM=(-1)"'
|
|
endif
|
|
|
|
executable('cwm', srcs, install : true, dependencies : deps)
|
|
install_man('cwm.1', 'cwmrc.5')
|