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', |
Patrick Williams | b2a3aa2 | 2021-07-27 13:30:52 -0500 | [diff] [blame] | 16 | 'lg2_logger.cpp', |
William A. Kennington III | e053884 | 2021-06-11 02:01:58 -0700 | [diff] [blame] | 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 | |
| 29 | phosphor_logging_reqs = [] |
| 30 | foreach dep : phosphor_logging_deps |
| 31 | if dep.type_name() == 'pkgconfig' |
| 32 | phosphor_logging_reqs += dep |
| 33 | endif |
| 34 | endforeach |
| 35 | |
| 36 | import('pkgconfig').generate( |
| 37 | phosphor_logging_lib, |
William A. Kennington III | c28601a | 2021-07-29 13:05:50 -0700 | [diff] [blame] | 38 | name: 'phosphor-logging', |
William A. Kennington III | e053884 | 2021-06-11 02:01:58 -0700 | [diff] [blame] | 39 | version: meson.project_version(), |
| 40 | requires: phosphor_logging_reqs, |
| 41 | description: 'Phosphor logging utilities', |
| 42 | ) |
| 43 | |
| 44 | phosphor_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 | |