summaryrefslogtreecommitdiff
path: root/tomlplusplus/toml-test/meson.build
diff options
context:
space:
mode:
Diffstat (limited to 'tomlplusplus/toml-test/meson.build')
-rw-r--r--tomlplusplus/toml-test/meson.build34
1 files changed, 34 insertions, 0 deletions
diff --git a/tomlplusplus/toml-test/meson.build b/tomlplusplus/toml-test/meson.build
new file mode 100644
index 0000000000..1196123f36
--- /dev/null
+++ b/tomlplusplus/toml-test/meson.build
@@ -0,0 +1,34 @@
+# This file is a part of toml++ and is subject to the the terms of the MIT license.
+# Copyright (c) Mark Gillard <mark.gillard@outlook.com.au>
+# See https://github.com/marzer/tomlplusplus/blob/master/LICENSE for the full license text.
+# SPDX-License-Identifier: MIT
+
+assert(build_tt)
+
+tt_deps = [ tomlplusplus_dep ]
+if not get_option('use_vendored_libs')
+ tt_deps += dependency('nlohmann_json', fallback: ['json', 'nlohmann_json_dep'])
+endif
+
+tt_args = []
+tt_args += global_args
+if get_option('use_vendored_libs')
+ tt_args += cpp.get_supported_arguments('-DUSE_VENDORED_LIBS=1')
+else
+ tt_args += cpp.get_supported_arguments('-DUSE_VENDORED_LIBS=0')
+endif
+
+executable(
+ 'tt_encoder',
+ files('tt_encoder.cpp'),
+ cpp_args: tt_args,
+ dependencies: tt_deps,
+ override_options: global_overrides
+)
+executable(
+ 'tt_decoder',
+ files('tt_decoder.cpp'),
+ cpp_args: tt_args,
+ dependencies: tt_deps,
+ override_options: global_overrides
+)