mirror of
https://github.com/nlohmann/json.git
synced 2026-09-30 22:06:42 +01:00
meson: add support for the GlobalUDLs option
Signed-off-by: Dylan Baker <dylan@pnwbakers.com>
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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',
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user