meson: add support for the GlobalUDLs option

Signed-off-by: Dylan Baker <dylan@pnwbakers.com>
This commit is contained in:
Dylan Baker
2026-09-27 14:47:03 +02:00
committed by Niels Lohmann
parent 91365ca3b2
commit c3774be4e2
2 changed files with 12 additions and 0 deletions
+6
View File
@@ -12,7 +12,13 @@ else
incdir = 'single_include'
endif
cpp_args = [
'-DJSON_USE_GLOBAL_UDLS=@0@'.format(
(not get_option('GlobalUDLs')).to_int()),
]
nlohmann_json_dep = declare_dependency(
compile_args: cpp_args,
include_directories: include_directories(incdir)
)
meson.override_dependency('nlohmann_json', nlohmann_json_dep)
+6
View File
@@ -4,3 +4,9 @@ option(
value: true,
description: 'Use non-amalgamated version of the library',
)
option(
'GlobalUDLs',
type: 'boolean',
value: true,
description: 'Place user-defined string literals in the global namespace',
)