mirror of
https://github.com/marzer/tomlplusplus.git
synced 2024-11-02 02:26:28 +00:00
36030cace8
When building tests, Meson will now look for system dependencies and use them if found. Otherwise, it will check if the submodules are cloned and create a dependency object wrapping the include path of each external dependency (this breaks Meson's sandbox, but the previous approach did too). This also allows passing actual dependencies to the various build targets instead of include paths (a bit more idiomatic). I've also made it possible to skip the tl-optional tests when the lib is not found, so that it is still possible to run tests even from a tarball (i.e. no git checkout)
23 lines
385 B
Meson
23 lines
385 B
Meson
tt_deps = [
|
|
tomlplusplus_dep,
|
|
dependency('nlohmann_json', fallback: ['json', 'nlohmann_json_dep'])
|
|
]
|
|
|
|
if get_option('build_tt_encoder')
|
|
executable(
|
|
'tt_encoder',
|
|
'tt_encoder.cpp',
|
|
cpp_args: devel_args,
|
|
dependencies: tt_deps
|
|
)
|
|
endif
|
|
|
|
if get_option('build_tt_decoder')
|
|
executable(
|
|
'tt_decoder',
|
|
'tt_decoder.cpp',
|
|
cpp_args: devel_args,
|
|
dependencies: tt_deps
|
|
)
|
|
endif
|