]>
Commit | Line | Data |
---|---|---|
95d3e3bb | 1 | project('plymouth', 'c', |
8f0584f7 | 2 | meson_version: '>= 0.62', |
36cf20c6 | 3 | version: run_command(['scripts/generate-version.sh'], check: true).stdout().strip(), |
95d3e3bb NDG |
4 | ) |
5 | ||
6 | # Modules | |
7 | i18n = import('i18n') | |
8 | pkgconfig = import('pkgconfig') | |
9 | ||
10 | # General variables | |
11 | plymouth_soversion = '5.0.0' | |
12 | ||
78fad74c | 13 | plymouth_theme_path = get_option('prefix') / get_option('datadir') / 'plymouth' / 'themes/' |
95d3e3bb NDG |
14 | plymouth_plugin_path = get_option('prefix') / get_option('libdir') / 'plymouth/' |
15 | plymouth_policy_dir = get_option('prefix') / get_option('datadir') / 'plymouth/' | |
16 | plymouth_conf_dir = get_option('prefix') / get_option('sysconfdir') / 'plymouth/' | |
17 | plymouth_time_dir = get_option('prefix') / get_option('localstatedir') / 'lib' / 'plymouth' | |
18 | ||
19 | plymouth_runtime_dir = get_option('runstatedir') / 'plymouth' | |
78fad74c | 20 | plymouth_runtime_theme_path = plymouth_runtime_dir / 'themes/' |
95d3e3bb NDG |
21 | |
22 | # Dependencies | |
23 | cc = meson.get_compiler('c') | |
24 | lm_dep = cc.find_library('m') | |
25 | lrt_dep = cc.find_library('rt') | |
6aefdea9 RS |
26 | |
27 | ldl_dep = dependency('dl') | |
95d3e3bb NDG |
28 | |
29 | libpng_dep = dependency('libpng', version: '>= 1.2.16') | |
30 | ||
31 | libudev_dep = dependency('libudev', required: get_option('udev')) | |
32 | libpango_dep = dependency('pango', required: get_option('pango')) | |
67bb3e20 RS |
33 | libcairo_dep = dependency('cairo', required: get_option('pango')) |
34 | libpangocairo_dep = dependency('pangocairo', required: get_option('pango')) | |
95d3e3bb NDG |
35 | libfreetype_dep = dependency('freetype2', required: get_option('freetype')) |
36 | gtk3_dep = dependency('gtk+-3.0', version: '>= 3.14.0', required: get_option('gtk')) | |
37 | libdrm_dep = dependency('libdrm', required: get_option('drm')) | |
dbec4487 DA |
38 | libevdev_dep = dependency('libevdev') |
39 | xkbcommon_dep = dependency('xkbcommon') | |
40 | xkeyboard_config_dep = dependency('xkeyboard-config') | |
95d3e3bb NDG |
41 | |
42 | if get_option('systemd-integration') | |
43 | systemd_dep = dependency('systemd') | |
44 | systemd_unit_dir = systemd_dep.get_variable('systemdsystemunitdir', | |
45 | pkgconfig_define: [ 'rootprefix', get_option('prefix') ], | |
46 | ) | |
47 | systemd_ask_password_agent = find_program('systemd-tty-ask-password-agent') | |
48 | endif | |
49 | ||
50 | if get_option('upstart-monitoring') | |
51 | dbus_dep = dependency('dbus-1') | |
52 | curses_dep = dependency('curses') | |
53 | endif | |
54 | ||
55 | # Logo | |
56 | plymouth_logo_file = get_option('logo') | |
57 | use_fallback_logo = plymouth_logo_file == '' | |
58 | if use_fallback_logo | |
59 | plymouth_logo_file = get_option('prefix') / get_option('datadir') / 'plymouth' / 'bizcom.png' | |
60 | endif | |
61 | ||
62 | # Global C flags | |
63 | add_project_arguments([ | |
64 | '-D_GNU_SOURCE', | |
54fb7e1d | 65 | '-include', 'config.h', |
95d3e3bb NDG |
66 | ], |
67 | language: 'c' | |
68 | ) | |
69 | ||
70 | # config.h | |
71 | conf = configuration_data() | |
72 | conf.set_quoted('BOOT_TTY', get_option('boot-tty')) | |
73 | conf.set_quoted('SHUTDOWN_TTY', get_option('shutdown-tty')) | |
74 | conf.set_quoted('RELEASE_FILE', get_option('release-file')) | |
75 | conf.set('HAVE_UDEV', libudev_dep.found()) | |
1de4e487 | 76 | conf.set('PLY_ENABLE_SYSTEMD_INTEGRATION', get_option('systemd-integration')) |
95d3e3bb NDG |
77 | conf.set('PLY_ENABLE_TRACING', get_option('tracing')) |
78 | conf.set_quoted('PLYMOUTH_RUNTIME_DIR', plymouth_runtime_dir) | |
79 | conf.set_quoted('PLYMOUTH_THEME_PATH', plymouth_theme_path) | |
80 | conf.set_quoted('PLYMOUTH_RUNTIME_THEME_PATH', plymouth_runtime_theme_path) | |
81 | conf.set_quoted('PLYMOUTH_PLUGIN_PATH', plymouth_plugin_path) | |
82 | conf.set_quoted('PLYMOUTH_POLICY_DIR', plymouth_policy_dir) | |
83 | conf.set_quoted('PLYMOUTH_CONF_DIR', plymouth_conf_dir) | |
84 | conf.set_quoted('PLYMOUTH_TIME_DIRECTORY', plymouth_time_dir) | |
85 | conf.set('HAVE_NCURSESW_TERM_H', get_option('upstart-monitoring')? cc.has_header('ncursesw/term.h') : false) | |
86 | conf.set('HAVE_NCURSES_TERM_H', get_option('upstart-monitoring')? cc.has_header('ncurses/term.h') : false) | |
87 | config_file = configure_file( | |
88 | output: 'config.h', | |
89 | configuration: conf, | |
90 | ) | |
91 | config_h_inc = include_directories('.') | |
92 | ||
93 | # Subdirectories | |
94 | subdir('images') | |
95 | subdir('po') | |
96 | subdir('src') | |
97 | subdir('themes') | |
98 | subdir('scripts') | |
99 | if get_option('systemd-integration') | |
100 | subdir('systemd-units') | |
101 | endif | |
102 | if get_option('docs') | |
103 | subdir('docs') | |
104 | endif |