xref: /openbmc/phosphor-logging/lib/meson.build (revision e0538848)
1phosphor_logging_includes = include_directories('include')
2
3phosphor_logging_gen = []
4
5subdir('include/phosphor-logging')
6
7phosphor_logging_deps = [
8    pdi_dep,
9    sdbusplus_dep,
10    systemd_dep,
11]
12
13phosphor_logging_lib = library(
14    'phosphor-logging',
15    'elog.cpp',
16    'sdjournal.cpp',
17    phosphor_logging_gen,
18    implicit_include_directories: false,
19    include_directories: phosphor_logging_includes,
20    dependencies: [
21        phosphor_logging_deps,
22        conf_h_dep,
23    ],
24    version: meson.project_version(),
25    install: true,
26)
27
28phosphor_logging_reqs = []
29foreach dep : phosphor_logging_deps
30    if dep.type_name() == 'pkgconfig'
31        phosphor_logging_reqs += dep
32    endif
33endforeach
34
35import('pkgconfig').generate(
36    phosphor_logging_lib,
37    version: meson.project_version(),
38    requires: phosphor_logging_reqs,
39    description: 'Phosphor logging utilities',
40)
41
42phosphor_logging_dep = declare_dependency(
43    include_directories: phosphor_logging_includes,
44    link_with: phosphor_logging_lib,
45    sources: phosphor_logging_gen,
46    dependencies: phosphor_logging_deps,
47)
48
49