aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2021-06-23 14:43:36 +0000
committerDaniel Eklöf <daniel@ekloef.se>2021-06-23 14:43:36 +0000
commit6268fc536b99d8594c3d48ad5473e9a411e75b5a (patch)
treef5ea1b1e7bd5e7a2ebc5684bc52e37c4dee88fae
parentserver: make sure ‘overrides’ have been initialized in all error paths (diff)
meson: add -Dterminfo-install-location=disabled|custom-path
Add a new meson option, ‘terminfo-install-location’, that allows you to customize _where_ the terminfo files are installed, relative to the installation prefix. It also recognizes the special value ‘disabled’, in which case the terminfo files are not installed at all. The terminfo files _are_ however built (allowing us to catch build errors), and foot still defaults to the ‘foot’ terminfo. It defaults to $datadir/terminfo If (the other option) ‘terminfo’ is set to disabled (or tic cannot be found), terminfo-install-location is automatically set to ‘disabled’.
-rw-r--r--meson.build13
-rw-r--r--meson_options.txt5
2 files changed, 15 insertions, 3 deletions
diff --git a/meson.build b/meson.build
index 479f5747..14d23975 100644
--- a/meson.build
+++ b/meson.build
@@ -216,13 +216,20 @@ executable(
install: true)
if tic.found()
+ terminfo_install_location = get_option('terminfo-install-location')
+ if terminfo_install_location == ''
+ terminfo_install_location = join_paths(get_option('datadir'), 'terminfo')
+ endif
+
custom_target(
'terminfo',
output: 'f',
input: 'foot.info',
command: [tic, '-x', '-o', '@OUTDIR@', '-e', 'foot,foot-direct', '@INPUT@'],
- install: true,
- install_dir: join_paths(get_option('datadir'), 'terminfo'))
+ install: terminfo_install_location != 'disabled',
+ install_dir: terminfo_install_location)
+else
+ terminfo_install_location = 'disabled'
endif
install_data(
@@ -240,6 +247,8 @@ subdir('icons')
summary(
{
'IME': get_option('ime'),
+ 'Terminfo': tic.found(),
+ 'Terminfo install location': terminfo_install_location,
},
bool_yn: true
)
diff --git a/meson_options.txt b/meson_options.txt
index b21bc7a4..52625b8d 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -1,2 +1,5 @@
option('ime', type: 'boolean', value: true, description: 'IME (Input Method Editor) support')
-option('terminfo', type: 'feature', description: 'Install terminfo')
+
+option('terminfo', type: 'feature', description: 'Build terminfo. When disabled, foot\'s terminfo will not be built, and foot will default to \'xterm-256color\' instead of \'foot\'.')
+
+option('terminfo-install-location', type: 'string', description: 'Where to install the foot terminfo files, relative to the installation prefix. If set to \'disabled\', the terminfo files are not installed at all (useful when packaging the terminfo files in a separate package). Defaults to $datadir/terminfo.')