-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmeson.build
50 lines (42 loc) · 1.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
project('nosurfin', 'c',
version: '0.5.0',
meson_version: '>= 0.50.0',
default_options: ['c_std=c99',
'warning_level=2']
)
# Find and set up c compiler
cc = meson.get_compiler('c')
cflags = cc.get_supported_arguments(['-O2'])
add_project_arguments(cflags, language: 'c')
#Set variables
prefix = get_option('prefix')
meson_version_split = meson.version().split('.')
#pkgdatadir = '/usr/local/share/nosurfin' or '/usr/share/nosurfin'
pkgdatadir = join_paths(prefix, get_option('datadir'), meson.project_name())
#glib_req = '>= 2.60.0'
# Find run time and system dependencies
#python_dep = dependency('python3', version: '>= 3.6')
gio_dep = dependency('gio-2.0')
gio_unix_dep = dependency('gio-unix-2.0')
glib_dep = dependency('glib-2.0')
gtk_dep = dependency('gtk+-3.0', version: '>= 3.24.0')
# Import Libraries
i18n = import('i18n') # Localization
gnome = import('gnome')
python = import('python')
py_install = python.find_installation('python3')
# Find python libraries
#if meson_version_split[1].to_int() >= 51
# modules: ['mitmproxy'])
# Please ensure jeepney is installed if you wish add urls to block
#else
# py_install = python.find_installation('python3')
#message('Please ensure mitmproxy is installed and version >= 5.1')
#message('Please ensure jeepney is installed and version >= 0.4')
#endif
# Include sub-directories
subdir('data')
subdir('nosurfin')
subdir('po')
#Post Install Script
meson.add_install_script('build-aux/meson/postinstall.py')