William A. Kennington III | e053884 | 2021-06-11 02:01:58 -0700 | [diff] [blame] | 1 | phosphor_logging_includes = include_directories('include') |
| 2 | |
| 3 | phosphor_logging_gen = [] |
| 4 | |
| 5 | subdir('include/phosphor-logging') |
| 6 | |
| 7 | phosphor_logging_deps = [ |
| 8 | pdi_dep, |
| 9 | sdbusplus_dep, |
| 10 | systemd_dep, |
| 11 | ] |
| 12 | |
| 13 | phosphor_logging_lib = library( |
William A. Kennington III | c28601a | 2021-07-29 13:05:50 -0700 | [diff] [blame] | 14 | 'phosphor_logging', |
William A. Kennington III | e053884 | 2021-06-11 02:01:58 -0700 | [diff] [blame] | 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 | |
| 28 | phosphor_logging_reqs = [] |
| 29 | foreach dep : phosphor_logging_deps |
| 30 | if dep.type_name() == 'pkgconfig' |
| 31 | phosphor_logging_reqs += dep |
| 32 | endif |
| 33 | endforeach |
| 34 | |
| 35 | import('pkgconfig').generate( |
| 36 | phosphor_logging_lib, |
William A. Kennington III | c28601a | 2021-07-29 13:05:50 -0700 | [diff] [blame] | 37 | name: 'phosphor-logging', |
William A. Kennington III | e053884 | 2021-06-11 02:01:58 -0700 | [diff] [blame] | 38 | version: meson.project_version(), |
| 39 | requires: phosphor_logging_reqs, |
| 40 | description: 'Phosphor logging utilities', |
| 41 | ) |
| 42 | |
| 43 | phosphor_logging_dep = declare_dependency( |
| 44 | include_directories: phosphor_logging_includes, |
| 45 | link_with: phosphor_logging_lib, |
| 46 | sources: phosphor_logging_gen, |
| 47 | dependencies: phosphor_logging_deps, |
| 48 | ) |
| 49 | |