-
Notifications
You must be signed in to change notification settings - Fork 13
/
meson.build
95 lines (87 loc) · 2.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
project('sundog', 'c', 'cpp',
default_options: ['default_library=static', 'c_std=c99', 'cpp_std=c++11', 'warning_level=2'])
sdl2_dep = dependency('SDL2')
sdl2main_dep = dependency('SDL2main', required: false)
m_lib = meson.get_compiler('c').find_library('m', required: false)
# Flip p-system endian (XXX should only be required on little-endian systems)
add_project_arguments(
'-DFLIP_ENDIAN_HACK',
language: ['c', 'cpp']
)
if get_option('psys_debugger')
add_project_arguments(
'-DPSYS_DEBUGGER',
language: ['c', 'cpp']
)
readline_dep = dependency('readline')
else
readline_dep = []
endif
if get_option('debug_ui')
add_project_arguments(
'-DENABLE_DEBUGUI',
language: ['c', 'cpp']
)
endif
if get_option('game_cheats')
add_project_arguments(
'-DGAME_CHEATS',
language: ['c', 'cpp']
)
endif
# C-standard settings.
if host_machine.system() == 'darwin'
add_project_arguments(
'-D_DARWIN_C_SOURCE=1', # MacOS memset_pattern4 for SDL
language: ['c'])
endif
# Warning overrides.
if meson.get_compiler('c').get_id() == 'msvc'
# XXX MSVC specific warning disables
else
add_project_arguments(
'-Wmissing-declarations',
'-Wno-unused-parameter',
'-Werror=implicit-function-declaration',
'-Wmissing-prototypes',
language: ['c'])
# shut up some warnings for imgui build
add_project_arguments(
'-Wno-unused-parameter',
'-Wno-class-memaccess',
'-Wno-missing-declarations',
language: ['cpp']
)
endif
resources = files(
'swoosh/frame000.bmp',
'swoosh/frame001.bmp',
'swoosh/frame002.bmp',
'swoosh/frame003.bmp',
'swoosh/frame004.bmp',
'swoosh/frame005.bmp',
'swoosh/frame006.bmp',
'swoosh/frame007.bmp',
'swoosh/frame008.bmp',
'swoosh/frame009.bmp',
'swoosh/frame010.bmp',
'shaders/screen-hq4x.vert',
'shaders/screen-hqish.vert',
'shaders/screen.vert',
'shaders/screen.frag',
'shaders/screen-hq4x.frag',
'shaders/screen-hqish.frag',
'shaders/hq4x.bmp.gz',
)
if get_option('builtin_image')
add_project_arguments(
'-DDISK_IMAGE_AS_RESOURCE',
language: ['c', 'cpp']
)
resources += files('game/sundog.st')
endif
prog_python = import('python').find_installation('python3')
resource_comp = files('tools/resource_compiler.py')
debug_info = files('tools/gen_debug_info.py', 'tools/libcalls_list.py', 'tools/appcalls_list.py')
subdir('thirdparty')
subdir('src')