generated from hsbasu/template-repo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
meson.build
104 lines (90 loc) · 3.66 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('plymouth', 'c',
meson_version: '>= 0.61',
version: run_command(['scripts/generate-version.sh'], check: true).stdout().strip(),
)
# Modules
i18n = import('i18n')
pkgconfig = import('pkgconfig')
# General variables
plymouth_soversion = '5.0.0'
plymouth_theme_path = get_option('prefix') / get_option('datadir') / 'plymouth' / 'themes/'
plymouth_plugin_path = get_option('prefix') / get_option('libdir') / 'plymouth/'
plymouth_policy_dir = get_option('prefix') / get_option('datadir') / 'plymouth/'
plymouth_conf_dir = get_option('prefix') / get_option('sysconfdir') / 'plymouth/'
plymouth_time_dir = get_option('prefix') / get_option('localstatedir') / 'lib' / 'plymouth'
plymouth_runtime_dir = get_option('runstatedir') / 'plymouth'
plymouth_runtime_theme_path = plymouth_runtime_dir / 'themes/'
# Dependencies
cc = meson.get_compiler('c')
lm_dep = cc.find_library('m')
lrt_dep = cc.find_library('rt')
ldl_dep = dependency('dl')
libpng_dep = dependency('libpng', version: '>= 1.2.16')
libudev_dep = dependency('libudev', required: get_option('udev'))
libpango_dep = dependency('pango', required: get_option('pango'))
libcairo_dep = dependency('cairo', required: get_option('pango'))
libpangocairo_dep = dependency('pangocairo', required: get_option('pango'))
libfreetype_dep = dependency('freetype2', required: get_option('freetype'))
gtk3_dep = dependency('gtk+-3.0', version: '>= 3.14.0', required: get_option('gtk'))
libdrm_dep = dependency('libdrm', required: get_option('drm'))
libevdev_dep = dependency('libevdev')
xkbcommon_dep = dependency('xkbcommon')
xkeyboard_config_dep = dependency('xkeyboard-config')
if get_option('systemd-integration')
systemd_dep = dependency('systemd')
systemd_unit_dir = systemd_dep.get_variable('systemdsystemunitdir',
pkgconfig_define: [ 'rootprefix', get_option('prefix') ],
)
systemd_ask_password_agent = find_program('systemd-tty-ask-password-agent')
endif
if get_option('upstart-monitoring')
dbus_dep = dependency('dbus-1')
curses_dep = dependency('curses')
endif
# Logo
plymouth_logo_file = get_option('logo')
use_fallback_logo = plymouth_logo_file == ''
if use_fallback_logo
plymouth_logo_file = get_option('prefix') / get_option('datadir') / 'plymouth' / 'bizcom.png'
endif
# Global C flags
add_project_arguments([
'-D_GNU_SOURCE',
'-include', 'config.h',
],
language: 'c'
)
# config.h
conf = configuration_data()
conf.set_quoted('BOOT_TTY', get_option('boot-tty'))
conf.set_quoted('SHUTDOWN_TTY', get_option('shutdown-tty'))
conf.set_quoted('RELEASE_FILE', get_option('release-file'))
conf.set('HAVE_UDEV', libudev_dep.found())
conf.set('PLY_ENABLE_SYSTEMD_INTEGRATION', get_option('systemd-integration'))
conf.set('PLY_ENABLE_TRACING', get_option('tracing'))
conf.set_quoted('PLYMOUTH_RUNTIME_DIR', plymouth_runtime_dir)
conf.set_quoted('PLYMOUTH_THEME_PATH', plymouth_theme_path)
conf.set_quoted('PLYMOUTH_RUNTIME_THEME_PATH', plymouth_runtime_theme_path)
conf.set_quoted('PLYMOUTH_PLUGIN_PATH', plymouth_plugin_path)
conf.set_quoted('PLYMOUTH_POLICY_DIR', plymouth_policy_dir)
conf.set_quoted('PLYMOUTH_CONF_DIR', plymouth_conf_dir)
conf.set_quoted('PLYMOUTH_TIME_DIRECTORY', plymouth_time_dir)
conf.set('HAVE_NCURSESW_TERM_H', get_option('upstart-monitoring')? cc.has_header('ncursesw/term.h') : false)
conf.set('HAVE_NCURSES_TERM_H', get_option('upstart-monitoring')? cc.has_header('ncurses/term.h') : false)
config_file = configure_file(
output: 'config.h',
configuration: conf,
)
config_h_inc = include_directories('.')
# Subdirectories
subdir('images')
subdir('po')
subdir('src')
subdir('themes')
subdir('scripts')
if get_option('systemd-integration')
subdir('systemd-units')
endif
if get_option('docs')
subdir('docs')
endif