-
Notifications
You must be signed in to change notification settings - Fork 0
/
meson.build
46 lines (39 loc) · 997 Bytes
/
meson.build
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
project('spdlog', 'cpp',
default_options: [
'buildtype=debugoptimized',
'cpp_std=c++20',
'cpp_rtti=false',
'cpp_eh=none'
],
version: '1.12.0'
)
compiler = meson.get_compiler('cpp')
link_deps = [ dependency('fmt') ]
incdirs = ['include']
cpp_flags = ['-DSPDLOG_COMPILED_LIB', '-DSPDLOG_FMT_EXTERNAL', '-DSPDLOG_NO_EXCEPTIONS']
sources = [
'src/async.cpp',
'src/bundled_fmtlib_format.cpp',
'src/cfg.cpp',
'src/color_sinks.cpp',
'src/file_sinks.cpp',
'src/spdlog.cpp',
'src/stdout_sinks.cpp',
]
incdirs = include_directories(incdirs)
spdlog = library(
'spdlog',
sources,
cpp_args: cpp_flags,
include_directories: incdirs,
dependencies: link_deps,
)
spdlog_dep = declare_dependency(
compile_args: cpp_flags,
include_directories: incdirs,
dependencies: link_deps,
link_with: spdlog,
version: meson.project_version()
)
meson.override_dependency('spdlog', spdlog_dep)
# vim: set ts=4 sts=4 sw=4 et: