-
Notifications
You must be signed in to change notification settings - Fork 0
/
meson.build
124 lines (116 loc) · 3.46 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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
# Copyright (C) 2022 Alexandros Theodotou <alex at zrythm dot org>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
project (
'passthrough-gtk4', 'c',
version : '0.1',
default_options : ['warning_level=2'])
# === Options ===
prefix = get_option('prefix')
lv2dir = prefix / get_option('lv2dir')
# === Detect OS ===
os_darwin = false
os_linux = false
os_freebsd = false
os_windows = false
if host_machine.system() == 'darwin'
os_darwin = true
elif host_machine.system() == 'linux'
os_linux = true
elif host_machine.system() == 'freebsd'
os_freebsd = true
elif host_machine.system() == 'windows'
os_windows = true
endif
# === Dependencies ===
lv2_dep = dependency (
'lv2', version: '>=1.16.0')
gtk_dep = dependency (
'gtk4', version: '>=4',
fallback: ['gtk4', 'libgtk_dep'],
default_options: [
'demos=false', 'build-examples=false',
'build-tests=false',
'media-gstreamer=disabled',
'introspection=disabled'])
# === CFlags ===
cc = meson.get_compiler ('c')
common_cflags = cc.get_supported_arguments ([
'-fvisibility=hidden',
'-Wformat=2',
'-Wno-missing-field-initializers',
'-Wno-unused-parameter',
'-Wno-sequence-point',
'-Wignored-qualifiers',
'-Wno-cast-function-type',
])
if get_option ('strict_flags')
common_cflags += cc.get_supported_arguments([
'-Werror=clobbered',
'-Werror=disabled-optimization',
'-Werror=double-promotion',
'-Werror=float-equal',
'-Werror=logical-op',
'-Werror=pointer-arith',
'-Werror=sign-conversion',
'-Werror=overlength-strings',
'-Werror=stringop-truncation',
'-Werror=missing-declarations',
'-Werror=shadow',
'-Werror=undef',
'-Werror=unused',
'-Werror=strict-aliasing',
'-fstrict-aliasing',
'-Wstrict-overflow=2',
'-fstrict-overflow',
'-Werror=duplicated-branches',
'-Werror=duplicated-cond',
'-Werror=null-dereference',
'-Werror=init-self',
'-Werror=jump-misses-init',
'-Werror=missing-prototypes',
'-Werror=nested-externs',
'-Werror=write-strings',
'-Werror=implicit-fallthrough',
'-Werror=sign-compare',
'-Werror=discarded-qualifiers',
'-Werror=float-conversion',
'-Werror=implicit-function-declaration',
'-Werror=uninitialized',
'-Werror=maybe-uninitialized',
'-Werror=return-type',
'-Werror=int-conversion',
'-Werror=format-security',
'-Werror=incompatible-pointer-types',
'-Werror=implicit-int',
'-Werror=multistatement-macros',
'-Werror=switch',
'-Werror=overflow',
'-Werror=array-bounds',
'-Werror=enum-compare',
'-Werror=misleading-indentation',
'-Werror=int-in-bool-context',
'-Werror=type-limits',
'-Werror=deprecated-declarations',
'-Werror=format-extra-args',
'-Werror=format',
])
if cc.get_id() == 'gcc'
common_cflags += cc.get_supported_arguments([
'-Wextra',
'-Weverything',
])
endif
endif
subdir ('src')