-
Notifications
You must be signed in to change notification settings - Fork 110
Expand file tree
/
Copy pathmeson.build
More file actions
78 lines (70 loc) · 2.01 KB
/
Copy pathmeson.build
File metadata and controls
78 lines (70 loc) · 2.01 KB
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
project('metamod', 'c', 'cpp', default_options: [
'warning_level=1',
'werror=true',
'cpp_std=c++14',
])
compiler = meson.get_compiler('cpp')
if compiler.get_id() == 'clang' or compiler.get_id() == 'gcc'
# C/C++ Defines
add_project_arguments([
'-Dstricmp=strcasecmp',
'-D_stricmp=strcasecmp',
'-D_snprintf=snprintf',
'-D_vsnprintf=vsnprintf',
'-DHAVE_STDINT_H',
'-DGNUC',
'-DCOMPILER_GCC',
], language: ['c', 'cpp'])
# C/C++ Arguments
add_project_arguments([
'-pipe',
'-fno-strict-aliasing',
'-Wno-uninitialized',
'-Wno-unused',
'-Wno-switch',
'-msse',
'-fPIC',
'-fno-omit-frame-pointer',
], language: ['c', 'cpp'])
# C++ Arguments
add_project_arguments([
'-fno-exceptions',
'-fno-rtti',
'-fno-threadsafe-statics',
'-Wno-non-virtual-dtor',
'-Wno-overloaded-virtual',
], language: 'cpp')
# Optional C++ Arguments
optional_arguments = [
'-Wno-delete-non-virtual-dtor',
'-mfpmath=sse',
'-Wno-implicit-exception-spec-mismatch',
'-Wno-expansion-to-defined',
'-Wno-inconsistent-missing-override',
'-Wno-deprecated-register',
'-Wno-deprecated',
'-Wno-implicit-int-float-conversion',
'-Wno-tautological-overlap-compare',
]
foreach arg : optional_arguments
if compiler.has_argument(arg)
add_project_arguments(arg, language: 'cpp')
endif
endforeach
# Platform Arguments
add_project_arguments('-D_LINUX', language: 'cpp')
add_project_arguments('-DPOSIX', language: 'cpp')
add_project_arguments('-D_FILE_OFFSET_BITS=64', language: 'cpp')
endif
if target_machine.cpu_family() == 'x86_64'
add_project_arguments('-DPLATFORM_64BITS', language: 'cpp')
add_project_arguments('-DX64BITS', language: 'cpp')
endif
public_inc = include_directories('public')
loader_inc = include_directories('loader')
core_inc = include_directories('core')
sourcehook_inc = include_directories('core/sourcehook')
amtl_inc = include_directories('third_party/amtl')
subdir('versionlib')
subdir('loader')
subdir('core')