xref: /openbmc/phosphor-logging/lib/meson.build (revision 92ae483f)
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    'lg2_logger.cpp',
17    'sdjournal.cpp',
18    phosphor_logging_gen,
19    implicit_include_directories: false,
20    include_directories: phosphor_logging_includes,
21    dependencies: [
22        phosphor_logging_deps,
23        conf_h_dep,
24    ],
25    version: meson.project_version(),
26    install: true,
27)
28
29phosphor_logging_reqs = []
30foreach dep : phosphor_logging_deps
31    if dep.type_name() == 'pkgconfig'
32        phosphor_logging_reqs += dep
33    endif
34endforeach
35
36import('pkgconfig').generate(
37    phosphor_logging_lib,
38    name: 'phosphor-logging',
39    version: meson.project_version(),
40    requires: phosphor_logging_reqs,
41    description: 'Phosphor logging utilities',
42)
43
44phosphor_logging_dep = declare_dependency(
45    include_directories: phosphor_logging_includes,
46    link_with: phosphor_logging_lib,
47    sources: phosphor_logging_gen,
48    dependencies: phosphor_logging_deps,
49)
50
51