-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathmeson.build
104 lines (87 loc) · 2.77 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
project(
'linux-steam-integration',
['c'],
version: '0.7.2',
license: [
'LGPL-2.1',
],
default_options: [
'c_std=c11',
],
)
am_cflags = [
'-fstack-protector',
'-pedantic',
'-Wstrict-prototypes',
'-Wundef',
'-fno-common',
'-Werror-implicit-function-declaration',
'-Wformat',
'-Wformat-security',
'-Werror=format-security',
'-Wno-conversion',
'-Wunused-variable',
'-Wunreachable-code',
'-Wall',
'-W',
'-D_FORTIFY_SOURCE=2',
]
add_global_arguments(am_cflags, language: 'c')
dep_gtk3 = dependency('gtk+-3.0', version: '>= 3.4.0')
cdata = configuration_data()
cdata.set_quoted('PACKAGE_NAME', meson.project_name())
prefix = get_option('prefix')
datadir = join_paths(prefix, get_option('datadir'))
vendordir = join_paths(datadir, 'defaults', meson.project_name())
sysconfdir = join_paths(prefix, get_option('sysconfdir'))
localedir = join_paths(prefix, get_option('localedir'))
cdata.set_quoted('SYSTEMCONFDIR', sysconfdir)
cdata.set_quoted('VENDORDIR', vendordir)
cdata.set_quoted('LOCALEDIR', localedir)
cdata.set_quoted('GETTEXT_PACKAGE', meson.project_name())
# Configurables
cdata.set_quoted('LSI_PRELOAD_LIBS', get_option('with-preload-libs'))
cdata.set_quoted('STEAM_BINARY', get_option('with-steam-binary'))
shim_behaviour = get_option('with-shim')
if shim_behaviour == 'replacement'
cdata.set('REPLACE_STEAM', '1')
endif
with_libintercept = get_option('with-libintercept')
if with_libintercept == true
cdata.set('HAVE_LIBINTERCEPT', '1')
endif
with_libredirect = get_option('with-libredirect')
if with_libredirect == true
cdata.set('HAVE_LIBREDIRECT', '1')
endif
with_frontend = get_option('with-frontend')
if get_option('with-new-libcxx-abi') == true
cdata.set('LSI_USE_NEW_ABI', '1')
endif
with_libressl_mode = get_option('with-libressl-mode')
if with_libressl_mode == 'native'
cdata.set('LSI_LIBRESSL_MODE_NATIVE', '1')
cdata.set('LSI_OVERRIDE_LIBRESSL', '1')
elif with_libressl_mode == 'shim'
cdata.set('LSI_LIBRESSL_MODE_SHIM', '1')
cdata.set('LSI_OVERRIDE_LIBRESSL', '1')
cdata.set_quoted('LSI_LIBRESSL_SUFFIX', get_option('with-libressl-suffix'))
else
message('LibreSSL mode isn\'t configured which may impact security')
endif
with_snap_support = get_option('with-snap-support')
if with_snap_support == true
cdata.set('HAVE_SNAPD_SUPPORT', '1')
with_fake_scripts_dir = join_paths(datadir, meson.project_name(), 'scripts')
cdata.set_quoted('FAKE_SCRIPTS_DIR', with_fake_scripts_dir)
subdir('snapd')
message('Enabling snapd support. Do NOT do this for distribution builds!')
endif
config_h = configure_file(
configuration: cdata,
output: 'config.h',
)
config_h_dir = include_directories('.')
subdir('data')
subdir('src')
subdir('po')