-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmeson.build
62 lines (54 loc) · 1.29 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
project('faststack', 'c',
version : '0.3.1',
license : 'GPLv3'
)
add_project_arguments(['-Os', '-Wall', '-Wextra', '-std=c99', '-pedantic', '-flto'],
language : 'c'
)
if meson.is_cross_build()
add_project_link_arguments(['-L../dlls'], language : 'c')
add_project_arguments(['-Wno-pedantic-ms-format', '-D__USE_MINGW_ANSI_STDIO'],
language: 'c'
)
endif
subdir('src/engine')
src = []
inc = [engine_inc]
deps = []
defines = []
if get_option('disable-option')
defines += ['-DFS_DISABLE_OPTION']
endif
if get_option('disable-log')
defines += ['-DFS_DISABLE_LOG']
endif
if get_option('disable-replay')
defines += ['-DFS_DISABLE_REPLAY']
endif
if get_option('disable-hiscore')
defines += ['-DFS_DISABLE_HISCORE']
endif
frontend = get_option('frontend')
if frontend == 'sdl'
subdir('src/frontend/SDL2')
src += sdl_src
deps += sdl_deps
defines += sdl_defines
inc += sdl_inc
elif frontend == 'terminal'
subdir('src/frontend/terminal')
src += terminal_src
deps += terminal_deps
defines += terminal_defines
inc += terminal_inc
else
error('invalid frontend specified')
endif
executable('faststack',
src,
include_directories : inc,
c_args : defines,
link_with : engine_lib,
dependencies : deps
)
subdir('test')