blob: 3c7e3fc29849f3dee0644e7013964837f96548a9 [file] [log] [blame]
William A. Kennington IIIe0538842021-06-11 02:01:58 -07001phosphor_logging_includes = include_directories('include')
2
3phosphor_logging_gen = []
4
5subdir('include/phosphor-logging')
6
Josh Lehan230f9f92023-07-20 22:21:06 +00007threads_dep = dependency('threads')
8
William A. Kennington IIIe0538842021-06-11 02:01:58 -07009phosphor_logging_deps = [
Patrick Williams75762242024-09-03 15:56:43 -040010 libsystemd_dep,
William A. Kennington IIIe0538842021-06-11 02:01:58 -070011 pdi_dep,
12 sdbusplus_dep,
Josh Lehan230f9f92023-07-20 22:21:06 +000013 threads_dep
William A. Kennington IIIe0538842021-06-11 02:01:58 -070014]
15
16phosphor_logging_lib = library(
William A. Kennington IIIc28601a2021-07-29 13:05:50 -070017 'phosphor_logging',
William A. Kennington IIIe0538842021-06-11 02:01:58 -070018 'elog.cpp',
Patrick Williamse001cd72024-10-07 10:59:30 -040019 'lg2_commit.cpp',
Patrick Williamsb2a3aa22021-07-27 13:30:52 -050020 'lg2_logger.cpp',
William A. Kennington IIIe0538842021-06-11 02:01:58 -070021 'sdjournal.cpp',
22 phosphor_logging_gen,
23 implicit_include_directories: false,
24 include_directories: phosphor_logging_includes,
25 dependencies: [
26 phosphor_logging_deps,
27 conf_h_dep,
28 ],
29 version: meson.project_version(),
30 install: true,
31)
32
33phosphor_logging_reqs = []
34foreach dep : phosphor_logging_deps
35 if dep.type_name() == 'pkgconfig'
36 phosphor_logging_reqs += dep
37 endif
38endforeach
39
40import('pkgconfig').generate(
41 phosphor_logging_lib,
William A. Kennington IIIc28601a2021-07-29 13:05:50 -070042 name: 'phosphor-logging',
William A. Kennington IIIe0538842021-06-11 02:01:58 -070043 version: meson.project_version(),
44 requires: phosphor_logging_reqs,
45 description: 'Phosphor logging utilities',
46)
47
48phosphor_logging_dep = declare_dependency(
49 include_directories: phosphor_logging_includes,
50 link_with: phosphor_logging_lib,
51 sources: phosphor_logging_gen,
52 dependencies: phosphor_logging_deps,
53)
54