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 | |
Josh Lehan | 230f9f9 | 2023-07-20 22:21:06 +0000 | [diff] [blame] | 7 | threads_dep = dependency('threads') |
| 8 | |
William A. Kennington III | e053884 | 2021-06-11 02:01:58 -0700 | [diff] [blame] | 9 | phosphor_logging_deps = [ |
| 10 | pdi_dep, |
| 11 | sdbusplus_dep, |
| 12 | systemd_dep, |
Josh Lehan | 230f9f9 | 2023-07-20 22:21:06 +0000 | [diff] [blame] | 13 | threads_dep |
William A. Kennington III | e053884 | 2021-06-11 02:01:58 -0700 | [diff] [blame] | 14 | ] |
| 15 | |
| 16 | phosphor_logging_lib = library( |
William A. Kennington III | c28601a | 2021-07-29 13:05:50 -0700 | [diff] [blame] | 17 | 'phosphor_logging', |
William A. Kennington III | e053884 | 2021-06-11 02:01:58 -0700 | [diff] [blame] | 18 | 'elog.cpp', |
Patrick Williams | b2a3aa2 | 2021-07-27 13:30:52 -0500 | [diff] [blame] | 19 | 'lg2_logger.cpp', |
William A. Kennington III | e053884 | 2021-06-11 02:01:58 -0700 | [diff] [blame] | 20 | 'sdjournal.cpp', |
| 21 | phosphor_logging_gen, |
| 22 | implicit_include_directories: false, |
| 23 | include_directories: phosphor_logging_includes, |
| 24 | dependencies: [ |
| 25 | phosphor_logging_deps, |
| 26 | conf_h_dep, |
| 27 | ], |
| 28 | version: meson.project_version(), |
| 29 | install: true, |
| 30 | ) |
| 31 | |
| 32 | phosphor_logging_reqs = [] |
| 33 | foreach dep : phosphor_logging_deps |
| 34 | if dep.type_name() == 'pkgconfig' |
| 35 | phosphor_logging_reqs += dep |
| 36 | endif |
| 37 | endforeach |
| 38 | |
| 39 | import('pkgconfig').generate( |
| 40 | phosphor_logging_lib, |
William A. Kennington III | c28601a | 2021-07-29 13:05:50 -0700 | [diff] [blame] | 41 | name: 'phosphor-logging', |
William A. Kennington III | e053884 | 2021-06-11 02:01:58 -0700 | [diff] [blame] | 42 | version: meson.project_version(), |
| 43 | requires: phosphor_logging_reqs, |
| 44 | description: 'Phosphor logging utilities', |
| 45 | ) |
| 46 | |
| 47 | phosphor_logging_dep = declare_dependency( |
| 48 | include_directories: phosphor_logging_includes, |
| 49 | link_with: phosphor_logging_lib, |
| 50 | sources: phosphor_logging_gen, |
| 51 | dependencies: phosphor_logging_deps, |
| 52 | ) |
| 53 | |