-
Notifications
You must be signed in to change notification settings - Fork 2
/
meson.build
64 lines (52 loc) · 1.49 KB
/
meson.build
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
project('jzip', 'c', version : '2.1', license : 'ModifiedBSD')
cc = meson.get_compiler('c')
deps = []
compile_args = ['-DPOSIX', '-DHARD_COLORS']
lib_src = files([
'control.c', 'extern.c', 'fileio.c', 'input.c', 'interpre.c',
'license.c', 'math.c', 'memory.c', 'object.c', 'operand.c', 'osdepend.c',
'property.c', 'quetzal.c', 'screen.c', 'text.c', 'variable.c'])
headers = files(['ztypes.h', 'jzip.h'])
if host_machine.system() == 'windows'
lib_src += 'winio.c'
compile_args += '-DLOUSY_RANDOM'
else
curses = dependency('ncursesw', required : false)
if curses.found() and cc.has_header('ncursesw/curses.h')
deps += curses
lib_src += 'cursesio.c'
else
termcap = cc.find_library('termcap', required : false)
if termcap.found()
deps += termcap
lib_src += 'unixio.c'
else
warning('using the fallback (not fully functional) "dumbio" module')
lib_src += 'dumbio.c'
endif
endif
endif
if cc.get_id() != 'msvc'
compile_args += '-DHAVE_GETOPT'
else
lib_src += 'getopt.c'
endif
jzip_lib = static_library('jzip',
lib_src,
c_args : compile_args)
incdir = include_directories('.')
jzip_dep = declare_dependency(
link_with : jzip_lib,
dependencies : deps,
include_directories : incdir)
jzip = executable('jzip',
'jzip.c',
c_args: compile_args,
link_with : jzip_lib,
dependencies : deps,
include_directories : incdir)
ckifzs = executable('ckifzs',
'ckifzs.c',
link_with : jzip_lib,
dependencies : deps,
include_directories : incdir)