[Buildroot] [PATCH 2/2] package/gtest: add and install a .pc file

Yann E. MORIN yann.morin at orange.com
Thu Jun 23 07:09:35 UTC 2016


Signed-off-by: "Yann E. MORIN" <yann.morin at orange.com>
Signed-off-by: Cedric Chedaleux <cedric.chedaleux at orange.com>
---
 package/gtest/gtest.mk |  2 ++
 package/gtest/gtest.pc | 11 +++++++++++
 2 files changed, 13 insertions(+)
 create mode 100644 package/gtest/gtest.pc

diff --git a/package/gtest/gtest.mk b/package/gtest/gtest.mk
index da08621..a4ef45b 100644
--- a/package/gtest/gtest.mk
+++ b/package/gtest/gtest.mk
@@ -31,6 +31,8 @@ define GTEST_INSTALL_STAGING_CMDS
 	$(INSTALL) -D -m 0755 $(@D)/libgtest_main.a $(STAGING_DIR)/usr/lib/libgtest_main.a
 	$(INSTALL) -d -m 0755 $(STAGING_DIR)/usr/include/gtest/
 	cp -rp $(@D)/include/gtest/* $(STAGING_DIR)/usr/include/gtest/
+	$(INSTALL) -D -m 0644 packages/gtest/gtest.pc \
+		$(STAGING_DIR)/usr/lib/pkgconfig/gtest.pc
 	# Generate the gtest-config script manually, since the CMake
 	# build system is not doing it.
 	sed 's%@PACKAGE_TARNAME@%gtest%;\
diff --git a/package/gtest/gtest.pc b/package/gtest/gtest.pc
new file mode 100644
index 0000000..b7a8aa4
--- /dev/null
+++ b/package/gtest/gtest.pc
@@ -0,0 +1,11 @@
+prefix=/usr
+exec_prefix=${prefix}
+libdir=${prefix}/lib/
+includedir=${prefix}/include
+
+Name: gtest
+Description: Google C++ Testing Framework
+Version: 1.7.0
+Libs: -L${libdir} -lgtest
+Libs.private: -lpthread
+Cflags: -I${includedir}
-- 
1.9.1




More information about the buildroot mailing list