]> git.pld-linux.org Git - packages/gmock.git/blame - install.patch
- package cmake support file, adjusted sources packaging accordingly
[packages/gmock.git] / install.patch
CommitLineData
7fbab88b
JR
1diff --git a/Makefile.am b/Makefile.am
2index adc21d7..2077654 100644
3--- a/Makefile.am
4+++ b/Makefile.am
5@@ -7,6 +7,9 @@ EXTRA_DIST =
6 # included in the 'subdirs' variable.
7 SUBDIRS = $(subdirs)
8
9+
10+bin_SCRIPTS = scripts/gmock-config
11+
12 # This is generated by the configure script, so clean it for distribution.
13 DISTCLEANFILES = scripts/gmock-config
14
15@@ -21,10 +24,13 @@ if HAVE_PTHREADS
16 endif
17
18 # Build rules for libraries.
19-lib_LTLIBRARIES = lib/libgmock.la lib/libgmock_main.la
20+check_LTLIBRARIES = lib/libgmock.la lib/libgmock_main.la
21
22-lib_libgmock_la_SOURCES = src/gmock-all.cc
23+nodist_lib_libgmock_la_SOURCES = src/gmock-all.cc
24
25+pkgconfigdir = $(datadir)/pkgconfig
26+pkgconfig_DATA = gmock.pc
27+
28 pkginclude_HEADERS = \
29 include/gmock/gmock-actions.h \
30 include/gmock/gmock-cardinalities.h \
31@@ -43,7 +49,7 @@ pkginclude_internal_HEADERS = \
32 include/gmock/internal/gmock-internal-utils.h \
33 include/gmock/internal/gmock-port.h
34
35-lib_libgmock_main_la_SOURCES = src/gmock_main.cc
36+nodist_lib_libgmock_main_la_SOURCES = src/gmock_main.cc
37 lib_libgmock_main_la_LIBADD = lib/libgmock.la
38
39 # Build rules for tests. Automake's naming for some of these variables isn't
40@@ -178,8 +184,8 @@ $(test_gmock_fused_test_SOURCES): fused-gmock-internal
41
42 # TODO(vladl@google.com): Find a way to add Google Tests's sources here.
43 fused-gmock-internal: $(pkginclude_HEADERS) $(pkginclude_internal_HEADERS) \
44- $(lib_libgmock_la_SOURCES) $(GMOCK_SOURCE_INGLUDES) \
45- $(lib_libgmock_main_la_SOURCES) \
46+ $(nodist_lib_libgmock_la_SOURCES) $(GMOCK_SOURCE_INGLUDES) \
47+ $(nodist_lib_libgmock_main_la_SOURCES) \
48 scripts/fuse_gmock_files.py
49 mkdir -p "$(srcdir)/fused-src"
50 chmod -R u+w "$(srcdir)/fused-src"
b9a55232 51@@ -200,10 +206,9 @@ CLEANFILES = core
7fbab88b
JR
52 # Mock can lead to undefined behavior due to violation of the
53 # One-Definition Rule.
54
55-install-exec-local:
56- echo "'make install' is dangerous and not supported. Instead, see README for how to integrate Google Mock into your build system."
57- false
58-
59-install-data-local:
60- echo "'make install' is dangerous and not supported. Instead, see README for how to integrate Google Mock into your build system."
61- false
62+install-exec-hook:
b9a55232 63+ mkdir -p $(DESTDIR)$(datadir)/@PACKAGE@ $(DESTDIR)$(prefix)/src/@PACKAGE@/src
7fbab88b 64+ cp -rf scripts/generator $(DESTDIR)$(datadir)/@PACKAGE@
b9a55232
JB
65+ cp -f src/* $(DESTDIR)$(prefix)/src/@PACKAGE@/src
66+ cp -f CMakeLists.txt $(DESTDIR)$(prefix)/src/@PACKAGE@
67+ sed -i s/src[/]//g $(DESTDIR)$(prefix)/src/@PACKAGE@/src/gmock-all.cc
7fbab88b
JR
68diff --git a/configure.ac b/configure.ac
69index e8b65bd..9ec7743 100644
70--- a/configure.ac
71+++ b/configure.ac
72@@ -10,7 +10,7 @@ AC_PREREQ([2.59])
73 AC_CONFIG_SRCDIR([./COPYING])
74 AC_CONFIG_AUX_DIR([build-aux])
75 AC_CONFIG_HEADERS([build-aux/config.h])
76-AC_CONFIG_FILES([Makefile])
77+AC_CONFIG_FILES([Makefile gmock.pc])
78 AC_CONFIG_FILES([scripts/gmock-config], [chmod +x scripts/gmock-config])
79
80 # Initialize Automake with various options. We require at least v1.9, prevent
81diff --git a/gmock.pc.in b/gmock.pc.in
82new file mode 100644
83index 0000000..da4b6c4
84--- /dev/null
85+++ b/gmock.pc.in
86@@ -0,0 +1,14 @@
87+#############################
88+# Pkg-Config file for gmock #
89+#############################
90+
91+Name: gmock
92+Description: Google C++ mocking framework
93+URL: https://code.google.com/p/googlemock/
94+Version: @VERSION@
95+
96+prefix=@prefix@
97+includedir=@includedir@
98+srcdir=@prefix@/src/gmock
99+
100+Cflags: -I${includedir}/gmock
This page took 0.059632 seconds and 4 git commands to generate.