From: Clemens Gruber Date: Mon, 22 Jan 2018 16:12:12 +0000 (+0100) Subject: build: add pkg-config support X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=819e2f5ee3e6b21b9cf7f07ee6ad3c57f48bfbef;p=qemu-gpiodev%2Flibgpiod.git build: add pkg-config support Create a libgpiod.pc file for pkg-config. Allows to use PKG_CHECK_MODULES([gpiod], [libgpiod >= 1.0],,) in other autoconf-based projects. Signed-off-by: Clemens Gruber Signed-off-by: Bartosz Golaszewski --- diff --git a/Makefile.am b/Makefile.am index af7aecb..dfa6d47 100644 --- a/Makefile.am +++ b/Makefile.am @@ -11,6 +11,9 @@ ACLOCAL_AMFLAGS = -I m4 AUTOMAKE_OPTIONS = foreign SUBDIRS = include src +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = libgpiod.pc + if WITH_TESTS SUBDIRS += tests diff --git a/configure.ac b/configure.ac index b4bf214..bb18868 100644 --- a/configure.ac +++ b/configure.ac @@ -120,7 +120,8 @@ then AC_MSG_NOTICE([doxygen not found - documentation cannot be generated]) fi -AC_CONFIG_FILES([Makefile +AC_CONFIG_FILES([libgpiod.pc + Makefile include/Makefile src/Makefile src/lib/Makefile diff --git a/libgpiod.pc.in b/libgpiod.pc.in new file mode 100644 index 0000000..48ff113 --- /dev/null +++ b/libgpiod.pc.in @@ -0,0 +1,11 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: libgpiod +Description: Library and tools for the Linux GPIO chardev +URL: @PACKAGE_URL@ +Version: @PACKAGE_VERSION@ +Libs: -L${libdir} -lgpiod +Cflags: -I${includedir}