Add fmtlib support
Call fmtlib functions while adding log to journal to display
additional parameters in the journal.
Signed-off-by: Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com>
Change-Id: I3579529919ee6599fca3499e2e12ad656f8c402a
diff --git a/meson.build b/meson.build
index ae9962f..b03d995 100644
--- a/meson.build
+++ b/meson.build
@@ -31,8 +31,21 @@
]
)
+fmt_dep = dependency('fmt', required: false)
+if not fmt_dep.found()
+ fmt_proj = import('cmake').subproject(
+ 'fmt',
+ cmake_options: [
+ '-DCMAKE_POSITION_INDEPENDENT_CODE=ON',
+ '-DMASTER_PROJECT=OFF'
+ ],
+ required: false)
+ assert(fmt_proj.found(), 'fmtlib is required')
+ fmt_dep = fmt_proj.dependency('fmt')
+endif
+
deps = [
- systemd, sdbusplus, phosphorlogging
+ systemd, sdbusplus, phosphorlogging, fmt_dep
]
realpath_prog = find_program('realpath')