-
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathmeson.build
More file actions
129 lines (117 loc) · 4.94 KB
/
meson.build
File metadata and controls
129 lines (117 loc) · 4.94 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
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
125
126
127
128
129
project('Dino', 'c', 'cpp', 'vala', version: '1.1.8.1', license: 'GPL-3.0', meson_version: '>=1.3.0')
# Security Hardening Flags
add_project_arguments(
'-fstack-protector-strong',
'-D_FORTIFY_SOURCE=2',
'-Wformat',
'-Werror=format-security',
# Suppress harmless warnings from Vala-generated C code
'-Wno-unused-variable',
'-Wno-unused-but-set-variable',
'-Wno-address',
'-Wno-discarded-qualifiers',
language: 'c'
)
add_project_arguments(
'-fstack-protector-strong',
'-D_FORTIFY_SOURCE=2',
'-Wformat',
'-Werror=format-security',
language: 'cpp'
)
add_project_arguments(
'--vapidir=' + meson.current_source_dir() / 'qlite/vapi',
language: 'vala'
)
if host_machine.system() == 'windows'
message('Forcing WINDOWS define for Vala')
add_project_arguments('--define=WINDOWS', language: 'vala')
endif
fs = import('fs')
gnome = import('gnome')
i18n = import('i18n')
python = import('python')
# plugin_crypto is enabled if any of the crypto plugins is enabled, auto if
# none of them are explicitly enabled but at least one is set to auto, or
# disabled if all of them are disabled.
plugin_crypto = get_option('plugin-ice')
foreach plugin : ['plugin-ice', 'plugin-omemo', 'plugin-rtp']
if get_option(plugin).enabled() and not plugin_crypto.enabled()
plugin_crypto = get_option(plugin)
elif get_option(plugin).allowed() and not plugin_crypto.allowed()
plugin_crypto = get_option(plugin)
endif
endforeach
dep_gdk_pixbuf = dependency('gdk-pixbuf-2.0')
dep_gee = dependency('gee-0.8')
dep_gio = dependency('gio-2.0')
dep_glib = dependency('glib-2.0')
dep_gnutls = dependency('gnutls', disabler: true, required: get_option('plugin-ice'))
dep_gmodule = dependency('gmodule-2.0')
dep_gpgme = dependency('gpgme', disabler: true, required: get_option('plugin-openpgp'))
dep_gstreamer = dependency('gstreamer-1.0')
dep_gstreamer_app = dependency('gstreamer-app-1.0', disabler: true, required: get_option('plugin-rtp'))
dep_gstreamer_app_core = dependency('gstreamer-app-1.0')
dep_gstreamer_audio = dependency('gstreamer-audio-1.0', disabler: true, required: get_option('plugin-rtp'))
dep_gstreamer_rtp = dependency('gstreamer-rtp-1.0', disabler: true, required: get_option('plugin-rtp'))
dep_gstreamer_sdp = dependency('gstreamer-sdp-1.0', required: false)
dep_gstreamer_video = dependency('gstreamer-video-1.0', disabler: true, required: get_option('plugin-rtp'))
dep_gstreamer_webrtc = dependency('gstreamer-webrtc-1.0', required: false)
dep_gtk4 = dependency('gtk4')
dep_gtk4_x11 = dependency('gtk4-x11', required: false)
dep_x11 = dependency('x11', required: false)
if host_machine.system() == 'windows'
dep_dbusmenu = disabler()
else
dep_dbusmenu = dependency('dbusmenu-glib-0.4')
endif
dep_icu_uc = dependency('icu-uc')
dep_json_glib = dependency('json-glib-1.0')
dep_libadwaita = dependency('libadwaita-1', version: '>=1.5')
if host_machine.system() == 'windows'
dep_libcanberra = disabler()
else
dep_libcanberra = dependency('libcanberra', disabler: true, required: get_option('plugin-notification-sound'))
endif
dep_libgcrypt = dependency('libgcrypt', disabler: true, required: plugin_crypto)
dep_libgcrypt_core = dependency('libgcrypt') # Non-disabling: CSPRNG is always required
dep_libqrencode = dependency('libqrencode', disabler: true, required: get_option('plugin-omemo'))
dep_libsrtp2 = dependency('libsrtp2', disabler: true, required: plugin_crypto)
dep_libomemo_c = dependency('libomemo-c', disabler: true, required: get_option('plugin-omemo'))
dep_libsoup = dependency('libsoup-3.0', version: '>= 3.0')
dep_nice = dependency('nice', version: '>=0.1.15', disabler: true, required: get_option('plugin-ice'))
dep_m = meson.get_compiler('c').find_library('m', required: false)
# dep_sqlite3 = dependency('sqlite3', version: '>=3.24')
dep_sqlcipher = dependency('sqlcipher', version: '>=3.4')
if host_machine.system() == 'windows'
dep_libsecret = dependency('libsecret-1', required: false)
else
dep_libsecret = dependency('libsecret-1')
endif
dep_webrtc_audio_processing = dependency('webrtc-audio-processing-2', required: false)
if not dep_webrtc_audio_processing.found()
dep_webrtc_audio_processing = dependency('webrtc-audio-processing-1', required: false)
endif
if not dep_webrtc_audio_processing.found()
dep_webrtc_audio_processing = disabler()
endif
dep_geoclue = dependency('libgeoclue-2.0', required: get_option('location-sharing'))
prog_git = find_program('git', required: false)
prog_python = python.find_installation()
if import('fs').is_file('VERSION') and meson.version().version_compare('>=1.4.0')
version_file = files('VERSION')[0]
version_file_path = version_file.full_path()
else
version_file = 'invalid'
version_file_path = meson.current_source_dir() / 'VERSION'
endif
default_install_rpath = ''
if get_option('set-install-rpath')
default_install_rpath = get_option('prefix') / get_option('libdir')
endif
subdir('qlite')
subdir('xmpp-vala')
subdir('crypto-vala')
subdir('libdino')
subdir('main')
subdir('plugins')