From 9e1746031a74785a905d6d957f71a9182747ed3f Mon Sep 17 00:00:00 2001 From: Ralf Habacker Date: Tue, 14 Feb 2017 20:58:57 +0100 Subject: [PATCH] Add cmake find_package support to autotools build system. Install cmake find_package related config files with autotools to let clients using cmake >= 2.6 find dbus library and headers by default. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=99721 --- Makefile.am | 8 +++++++- cmake/DBus1ConfigVersion.cmake.in | 2 +- configure.ac | 2 ++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Makefile.am b/Makefile.am index db0d522..970b90d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -3,8 +3,14 @@ SUBDIRS=dbus bus tools test doc pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = dbus-1.pc +cmakeconfigdir = $(libdir)/cmake/DBus1 +cmakeconfig_DATA = cmake/DBus1Config.cmake \ + cmake/DBus1ConfigVersion.cmake + DISTCLEANFILES = \ - dbus-1.pc + ${pkgconfig_DATA} \ + ${cmakeconfig_DATA} \ + $(NULL) EXTRA_DIST = \ autogen.sh \ diff --git a/cmake/DBus1ConfigVersion.cmake.in b/cmake/DBus1ConfigVersion.cmake.in index e691528..239bf59 100644 --- a/cmake/DBus1ConfigVersion.cmake.in +++ b/cmake/DBus1ConfigVersion.cmake.in @@ -1,4 +1,4 @@ -set(PACKAGE_VERSION "@DBUS_VERSION@") +set(PACKAGE_VERSION @DBUS_VERSION@) # Check whether the requested PACKAGE_FIND_VERSION is compatible if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}") diff --git a/configure.ac b/configure.ac index c7c762e..190b42b 100644 --- a/configure.ac +++ b/configure.ac @@ -1895,6 +1895,8 @@ doc/dbus-update-activation-environment.1.xml doc/dbus-uuidgen.1.xml dbus-1.pc dbus-1-uninstalled.pc +cmake/DBus1Config.cmake +cmake/DBus1ConfigVersion.cmake ]) AC_OUTPUT -- 2.6.6