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