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