|
|
|
@ -14,6 +14,8 @@ project('spdlog', ['cpp'],
|
|
|
|
|
# ------------------------
|
|
|
|
|
dep_list = []
|
|
|
|
|
compile_args = []
|
|
|
|
|
private_args = []
|
|
|
|
|
public_args = []
|
|
|
|
|
|
|
|
|
|
# Threads
|
|
|
|
|
dep_list += dependency('threads')
|
|
|
|
@ -25,6 +27,9 @@ if get_option('external_fmt')
|
|
|
|
|
endif
|
|
|
|
|
dep_list += dependency('fmt', fallback : ['fmt', 'fmt_dep'])
|
|
|
|
|
compile_args += '-DSPDLOG_FMT_EXTERNAL'
|
|
|
|
|
else
|
|
|
|
|
public_args += ['-DFMT_SHARED']
|
|
|
|
|
private_args += ['-DFMT_EXPORT']
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
if get_option('no_exceptions')
|
|
|
|
@ -69,6 +74,8 @@ if get_option('no_atomic_levels')
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
compile_args_compiled = compile_args + ['-DSPDLOG_COMPILED_LIB']
|
|
|
|
|
compile_args_private = compile_args_compiled + public_args
|
|
|
|
|
compile_args_public = compile_args_compiled + private_args
|
|
|
|
|
compile_args_ho = compile_args
|
|
|
|
|
|
|
|
|
|
# ------------------------------------
|
|
|
|
@ -99,21 +106,25 @@ if get_option('library_type') == 'static'
|
|
|
|
|
dependencies : dep_list,
|
|
|
|
|
install : not meson.is_subproject()
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
dep_args = compile_args_compiled
|
|
|
|
|
else
|
|
|
|
|
spdlog = shared_library('spdlog',
|
|
|
|
|
spdlog_srcs,
|
|
|
|
|
cpp_args : compile_args_compiled,
|
|
|
|
|
cpp_args : compile_args_private,
|
|
|
|
|
include_directories : spdlog_inc,
|
|
|
|
|
dependencies : dep_list,
|
|
|
|
|
install : not meson.is_subproject(),
|
|
|
|
|
version : meson.project_version(),
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
dep_args = compile_args_public
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
spdlog_dep = declare_dependency(
|
|
|
|
|
link_with : spdlog,
|
|
|
|
|
include_directories : spdlog_inc,
|
|
|
|
|
compile_args : compile_args_compiled,
|
|
|
|
|
compile_args : dep_args,
|
|
|
|
|
dependencies : dep_list,
|
|
|
|
|
version : meson.project_version(),
|
|
|
|
|
)
|
|
|
|
|