summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--meson.build4
-rw-r--r--meson_options.txt5
-rw-r--r--mu/meson.build5
-rw-r--r--mu/mu-options.cc6
-rw-r--r--thirdparty/cli11/CLI11.hpp (renamed from thirdparty/CLI11.hpp)0
5 files changed, 16 insertions, 4 deletions
diff --git a/meson.build b/meson.build
index a372157..3ec8a5f 100644
--- a/meson.build
+++ b/meson.build
@@ -230,7 +230,9 @@ if not fmt_dep.found() or get_option('use-embedded-fmt')
compile_args: '-DFMT_HEADER_ONLY')
endif
-# use system's CLI11 if found, otherwise fall back to embedded version
+# use system's CLI11 if found, otherwise fall back to embedded version. we can
+# probably get away with a lower version, but want to have (roughly) the same in
+# embedded / system.
cli11_dep = dependency('CLI11', version: '>=2.4', required:false)
if not cli11_dep.found() or get_option('use-embedded-cli11')
message('using embedded CLI11')
diff --git a/meson_options.txt b/meson_options.txt
index 1ef09b0..fcffae7 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -25,6 +25,11 @@ option('use-embedded-fmt',
value: false,
description: 'Use the embedded fmt, even if system package is found')
+option('use-embedded-cli11',
+ type: 'boolean',
+ value: false,
+ description: 'Use the embedded CLI11, even if system package is found')
+
#
# language detection
#
diff --git a/mu/meson.build b/mu/meson.build
index 28dd00e..ee2460d 100644
--- a/mu/meson.build
+++ b/mu/meson.build
@@ -1,4 +1,4 @@
-## Copyright (C) 2021-2023 Dirk-Jan C. Binnema <djcb@djcbsoftware.nl>
+## Copyright (C) 2021-2025 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
@@ -34,7 +34,8 @@ mu = executable(
'mu-cmd-view.cc',
'mu-cmd.cc'
],
- dependencies: [ glib_dep, gmime_dep, lib_mu_dep, mu_scm_dep, thread_dep, config_h_dep ],
+ dependencies: [ glib_dep, gmime_dep, cli11_dep,
+ lib_mu_dep, mu_scm_dep, thread_dep, config_h_dep ],
cpp_args: ['-DMU_SCRIPTS_DIR="'+ join_paths(datadir, 'mu', 'scripts') + '"'],
install: true)
#
diff --git a/mu/mu-options.cc b/mu/mu-options.cc
index f9593a2..9161028 100644
--- a/mu/mu-options.cc
+++ b/mu/mu-options.cc
@@ -49,7 +49,11 @@
#include "mu-options.hh"
#include "mu-script.hh"
-#include <thirdparty/CLI11.hpp>
+#ifdef USE_EMBEDDED_CLI11
+#include "CLI11.hpp"
+#else
+#include "CLI/CLI.hpp"
+#endif
using namespace Mu;
diff --git a/thirdparty/CLI11.hpp b/thirdparty/cli11/CLI11.hpp
index 8a5b4c5..8a5b4c5 100644
--- a/thirdparty/CLI11.hpp
+++ b/thirdparty/cli11/CLI11.hpp