Port to meson
This commit is contained in:
parent
24acf99fe3
commit
8d3f12fd36
5 changed files with 36 additions and 686 deletions
32
meson.build
Normal file
32
meson.build
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
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')
|
||||
Loading…
Add table
Add a link
Reference in a new issue