Files
mu4e/scm/meson.build
Dirk-Jan C. Binnema ac52584562 build: modernize meson usage
Since we require meson 1.3(.2), we can modernize the usage a bit,
as well as improve some logic

- use / instead of join_paths
- use option.allowed() instead of !option.disable()
- use cxx.get_supported_arguments
- use fs.copyfile instead of configure_file
- show a summary at the end of the configuration
2026-08-20 15:05:32 -07:00

75 lines
2.5 KiB
Meson

## Copyright (C) 2025-2026 Dirk-Jan C. Binnema <djcb@djcbsoftware.nl>
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation; either version 3 of the License, or
## (at your option) any later version.
##
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with this program; if not, write to the Free Software Foundation,
## Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
mu_scm_dir=datadir / 'mu' / 'scm'
mu_scm_dir_arg=f'-DMU_SCM_DIR="@mu_scm_dir@"'
lib_mu_scm=static_library(
'mu-scm', [
'mu-scm.cc',
'mu-scm-message.cc',
'mu-scm-mime.cc',
'mu-scm-store.cc'
],
dependencies: [
guile_dep,
config_h_dep,
lib_mu_dep,
lib_mu_utils_dep,
lib_mu_message_dep],
install: false,
cpp_args: [mu_scm_dir_arg])
install_data(['mu-scm.scm',
'mu-scm-repl.scm'],
install_dir : mu_scm_dir)
# note: top-level meson.build defines a dummy replacement for this.
mu_scm_dep = declare_dependency(
link_with: lib_mu_scm,
dependencies: [guile_dep, lib_mu_dep, config_h_dep, thread_dep ],
include_directories:
include_directories(['.', '..']))
if makeinfo.found()
custom_target('mu_scm_info',
input: 'mu-scm.texi',
output: 'mu-scm.info',
install: true,
install_dir: infodir,
depends: fdl_texi,
command: [makeinfo,
'-o', meson.current_build_dir() / 'mu-scm.info',
meson.current_source_dir() / 'mu-scm.texi',
'-I', meson.current_build_dir() / '..'])
if install_info.found()
meson.add_install_script(install_info_script, infodir, 'mu-scm.info')
endif
endif
if get_option('tests').allowed()
srcdir=meson.current_source_dir()
def_srcdir=f'-DMU_SCM_SRCDIR="@srcdir@"'
test('test-scm',
executable('test-scm',
'mu-scm.cc',
install: false,
build_by_default: false,
dependencies: [mu_scm_dep],
cpp_args: [mu_scm_dir_arg, def_srcdir, '-DBUILD_TESTS']))
endif