blob: 9c65652d1eb46f7f1f505ebad51be67cdf50c77e [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 = [
10 pdi_dep,
11 sdbusplus_dep,
12 systemd_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 Williamsb2a3aa22021-07-27 13:30:52 -050019 'lg2_logger.cpp',
William A. Kennington IIIe0538842021-06-11 02:01:58 -070020 'sdjournal.cpp',
21 phosphor_logging_gen,
22 implicit_include_directories: false,
23 include_directories: phosphor_logging_includes,
24 dependencies: [
25 phosphor_logging_deps,
26 conf_h_dep,
27 ],
28 version: meson.project_version(),
29 install: true,
30)
31
32phosphor_logging_reqs = []
33foreach dep : phosphor_logging_deps
34 if dep.type_name() == 'pkgconfig'
35 phosphor_logging_reqs += dep
36 endif
37endforeach
38
39import('pkgconfig').generate(
40 phosphor_logging_lib,
William A. Kennington IIIc28601a2021-07-29 13:05:50 -070041 name: 'phosphor-logging',
William A. Kennington IIIe0538842021-06-11 02:01:58 -070042 version: meson.project_version(),
43 requires: phosphor_logging_reqs,
44 description: 'Phosphor logging utilities',
45)
46
47phosphor_logging_dep = declare_dependency(
48 include_directories: phosphor_logging_includes,
49 link_with: phosphor_logging_lib,
50 sources: phosphor_logging_gen,
51 dependencies: phosphor_logging_deps,
52)
53