2023-12-03 23:39:03 +08:00
|
|
|
project('spdlog', 'cpp', version : '1.12.0', license: 'MIT',
|
2022-06-08 02:47:05 +08:00
|
|
|
default_options : ['cpp_std=c++20'])
|
2021-12-19 19:41:05 +08:00
|
|
|
|
|
|
|
inc = include_directories('include')
|
|
|
|
|
|
|
|
thread_dep = dependency('threads')
|
|
|
|
|
2022-06-08 02:47:05 +08:00
|
|
|
spdlog_dependencies = [thread_dep]
|
2021-12-19 19:41:05 +08:00
|
|
|
spdlog_compile_args = []
|
|
|
|
|
|
|
|
|
|
|
|
if get_option('external_fmt')
|
|
|
|
fmt_dep = dependency('fmt')
|
|
|
|
spdlog_dependencies += fmt_dep
|
|
|
|
spdlog_compile_args += '-DSPDLOG_FMT_EXTERNAL'
|
|
|
|
endif
|
|
|
|
|
|
|
|
if get_option('compile_library')
|
|
|
|
spdlog_compile_args += '-DSPDLOG_COMPILED_LIB'
|
|
|
|
subdir('src')
|
2022-06-08 02:47:05 +08:00
|
|
|
|
2021-12-19 19:41:05 +08:00
|
|
|
spdlog_dep = declare_dependency(include_directories : inc, dependencies : spdlog_dependencies, link_with : spdlog_lib, compile_args : spdlog_compile_args)
|
2022-06-08 02:47:05 +08:00
|
|
|
else
|
2021-12-19 19:41:05 +08:00
|
|
|
spdlog_dep = declare_dependency(include_directories : inc, dependencies : spdlog_dependencies, compile_args : spdlog_compile_args)
|
|
|
|
endif
|
|
|
|
|
|
|
|
if get_option('tests')
|
|
|
|
subdir('tests')
|
|
|
|
endif
|