Add pkgconfig
Generate pkgconfig for phosphor-ipmi-blobs so that the library can be
found by Meson.
When used as a dependency, phosphor-ipmi-blobs provides only a header
file and no libraries to link against, so the pkgconfig file has no
linker flags.
Tested: added phosphor-ipmi-blobs as a dependency in
phosphor-health-monitor's meson.build file and built successfully.
signed-off-by: Sui Chen <suichen@google.com>
Change-Id: I126c66dbd65ddbd99f921297d813e7a0f9981f22
diff --git a/Makefile.am b/Makefile.am
index 974f338..6bfa178 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -106,3 +106,5 @@
-flto
SUBDIRS = . test
+
+pkgconfig_DATA = phosphor-ipmi-blobs.pc
diff --git a/configure.ac b/configure.ac
index 0b46133..5392c6c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -170,6 +170,9 @@
AS_IF([test "x$BLOB_LIB_PATH" == "x"], [BLOB_LIB_PATH="/usr/lib/blob-ipmid"])
AC_DEFINE_UNQUOTED([BLOB_LIB_PATH], ["$BLOB_LIB_PATH"], [The file path to search for libraries.])
+AC_CONFIG_FILES([phosphor-ipmi-blobs.pc])
+PKG_INSTALLDIR
+
# Create configured output
AC_CONFIG_FILES([Makefile test/Makefile])
AC_OUTPUT
diff --git a/phosphor-ipmi-blobs.pc.in b/phosphor-ipmi-blobs.pc.in
new file mode 100644
index 0000000..1ccc785
--- /dev/null
+++ b/phosphor-ipmi-blobs.pc.in
@@ -0,0 +1,5 @@
+Name: phosphor-ipmi-blobs
+Description: Phosphor Blob Transfer Interface
+URL: https://github.com/openbmc/phosphor-ipmi-blobs
+Version: @VERSION@
+Cflags: -I@includedir@