blob: aa38fe49ffd6bdf405e3d0f26b1fb0f032c5db98 [file] [log] [blame]
Patrick Williamsb48b7b42016-08-17 15:04:38 -05001From 45661183a7c78d8c4f75adcf53c6ddd663dc8b2d Mon Sep 17 00:00:00 2001
2From: Mario Domenech Goulart <mario@ossystems.com.br>
3Date: Mon, 20 Oct 2014 17:12:58 -0200
4Subject: [PATCH] CMakeLists, gmock.pc.in: Add pkg-config support
5Organization: O.S. Systems Software LTDA.
6
7Signed-off-by: Mario Domenech Goulart <mario@ossystems.com.br>
8---
9 CMakeLists.txt | 7 ++++++-
10 gmock.pc.in | 9 +++++++++
11 2 files changed, 15 insertions(+), 1 deletion(-)
12 create mode 100644 gmock.pc.in
13
14diff --git a/CMakeLists.txt b/CMakeLists.txt
15index 90e797a..98fd824 100644
16--- a/CMakeLists.txt
17+++ b/CMakeLists.txt
18@@ -27,6 +27,9 @@ if (COMMAND pre_project_set_up_hermetic_build)
19 pre_project_set_up_hermetic_build()
20 endif()
21
22+# pkg-config support
23+configure_file("gmock.pc.in" "gmock.pc" @ONLY)
24+
25 ########################################################################
26 #
27 # Project-wide settings
28@@ -87,7 +90,9 @@ cxx_library(gmock_main
29
30 install(TARGETS gmock DESTINATION lib)
31 install(TARGETS gmock_main DESTINATION lib)
32-
33+install(FILES "${CMAKE_CURRENT_BINARY_DIR}/gmock.pc"
34+ DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/pkgconfig/"
35+)
36 ########################################################################
37 #
38 # Google Mock's own tests.
39diff --git a/gmock.pc.in b/gmock.pc.in
40new file mode 100644
41index 0000000..08ad8d2
42--- /dev/null
43+++ b/gmock.pc.in
44@@ -0,0 +1,9 @@
45+Name: libgmock
46+Version: 1.7.0
47+Description: Google's framework for writing C++ tests on a variety of platforms
48+
49+prefix=@CMAKE_INSTALL_PREFIX@
50+includedir=${prefix}/include
51+libdir=${prefix}/lib
52+Cflags:-I${includedir}/gmock
53+Libs: -L${libdir} -lgmock -lgmock_main
54--
551.9.1
56