aboutsummaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2023-07-26 14:14:38 +0000
committerDaniel Eklöf <daniel@ekloef.se>2023-07-28 13:40:53 +0000
commit139fd6d55cbdd2833be3d3eb7f2c96c87a7fa42d (patch)
tree331de24478c8f5ee29549d00344503a7b85cdf85 /meson.build
parentconfig: add tweak.bold-text-in-bright-amount (diff)
meson: add -Dterminfo-base-name option
This defines the base name of the generated terminfo files. It defaults to the value of -Ddefault-terminfo (i.e. 'foot') Example: meson -Ddefault-terminfo=foot-bananas -Dterminfo-base-name=foot-apples The generated terminfo files will be * terminfo/f/foot-apples * terminfo/f/foot-apples-direct The default value of $TERM will be 'foot-bananas'
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build12
1 files changed, 9 insertions, 3 deletions
diff --git a/meson.build b/meson.build
index aeb2daa6..87af1edd 100644
--- a/meson.build
+++ b/meson.build
@@ -352,11 +352,16 @@ if get_option('themes')
install_subdir('themes', install_dir: join_paths(get_option('datadir'), 'foot'))
endif
+terminfo_base_name = get_option('terminfo-base-name')
+if terminfo_base_name == ''
+ terminfo_base_name = get_option('default-terminfo')
+endif
+
tic = find_program('tic', native: true, required: get_option('terminfo'))
if tic.found()
conf_data = configuration_data(
{
- 'default_terminfo': get_option('default-terminfo'),
+ 'default_terminfo': terminfo_base_name
}
)
@@ -367,9 +372,9 @@ if tic.found()
)
custom_target(
'terminfo',
- output: get_option('default-terminfo')[0],
+ output: terminfo_base_name[0],
input: preprocessed,
- command: [tic, '-x', '-o', '@OUTDIR@', '-e', '@0@,@0@-direct'.format(get_option('default-terminfo')), '@INPUT@'],
+ command: [tic, '-x', '-o', '@OUTDIR@', '-e', '@0@,@0@-direct'.format(terminfo_base_name), '@INPUT@'],
install: true,
install_dir: terminfo_install_location
)
@@ -395,6 +400,7 @@ summary(
'utmp backend': utmp_backend,
'utmp helper default path': utmp_default_helper_path,
'Build terminfo': tic.found(),
+ 'Terminfo base name': terminfo_base_name,
'Terminfo install location': terminfo_install_location,
'Default TERM': get_option('default-terminfo'),
'Set TERMINFO': get_option('custom-terminfo-install-location') != '',