xref: /openbmc/phosphor-logging/lib/meson.build (revision a06b4c6b)
1phosphor_logging_includes = include_directories('include')
2
3phosphor_logging_gen = []
4
5subdir('include/phosphor-logging')
6
7threads_dep = dependency('threads')
8
9phosphor_logging_deps = [
10    libsystemd_dep,
11    pdi_dep,
12    sdbusplus_dep,
13    threads_dep
14]
15
16phosphor_logging_lib = library(
17    'phosphor_logging',
18    'elog.cpp',
19    'lg2_commit.cpp',
20    'lg2_logger.cpp',
21    '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,
42    name: 'phosphor-logging',
43    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
55