build: add 'lispdir' option

Add lispdir option for installing mu4e in a custom directory, which what
some pre-meson users tended to do with --lispdir.

Passing '-Dlispdir=/tmp/foo/bar' causes the mu4e files to be installed
in /tmp/foo/bar/mu4e.

Should help for issue #2287.
This commit is contained in:
Dirk-Jan C. Binnema
2022-07-02 12:18:51 +03:00
parent a423a8bbcc
commit 8f1d83e4b2
3 changed files with 19 additions and 9 deletions

View File

@ -31,10 +31,18 @@ project('mu', ['c', 'cpp'],
# installation paths
prefixdir = get_option('prefix')
bindir = join_paths(prefixdir, get_option('bindir'))
datadir = join_paths(prefixdir, get_option('datadir'))
mandir = join_paths(prefixdir, get_option('mandir'))
infodir = join_paths(prefixdir, get_option('infodir'))
bindir = prefixdir / get_option('bindir')
datadir = prefixdir / get_option('datadir')
mandir = prefixdir / get_option('mandir')
infodir = prefixdir / get_option('infodir')
# allow for configuring lispdir, as with autotools.
# default to <p
if get_option('lispdir') == ''
mu4e_lispdir= datadir / join_paths('emacs', 'site-lisp', 'mu4e')
else
mu4e_lispdir= get_option('lispdir') / 'mu4e'
endif
################################################################################
# compilers / flags