diff options
author | Mario Domenech Goulart <mario@ossystems.com.br> | 2014-10-30 11:10:46 -0200 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2014-11-19 15:19:25 +0100 |
commit | 3243648a188b47ee905c24122352e32bb3e29e60 (patch) | |
tree | 356441dd9abd2bd9b0e648e1dc486dba6c1c94a5 | |
parent | ff5cda05c9caa0a1c8fc47e8ad5898acb7755399 (diff) | |
download | meta-openembedded-3243648a188b47ee905c24122352e32bb3e29e60.tar.gz |
gmock: add recipe
gmock is a library for writing and using C++ mock classes, by Google.
Signed-off-by: Mario Domenech Goulart <mario@ossystems.com.br>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
3 files changed, 119 insertions, 0 deletions
diff --git a/meta-oe/recipes-test/gmock/gmock/cmake-Add-install-command-for-libraries-and-headers.patch b/meta-oe/recipes-test/gmock/gmock/cmake-Add-install-command-for-libraries-and-headers.patch new file mode 100644 index 000000000..92a639365 --- /dev/null +++ b/meta-oe/recipes-test/gmock/gmock/cmake-Add-install-command-for-libraries-and-headers.patch | |||
@@ -0,0 +1,40 @@ | |||
1 | From ba0a7d65c918cb7e3f2073553c4cc7af5858ed03 Mon Sep 17 00:00:00 2001 | ||
2 | From: Otavio Salvador <otavio@ossystems.com.br> | ||
3 | Date: Thu, 31 Jul 2014 16:54:00 -0300 | ||
4 | Subject: [PATCH] cmake: Add install command for libraries and headers | ||
5 | Organization: O.S. Systems Software LTDA. | ||
6 | |||
7 | Upstream-Status: Inappropriate [embedded specific] | ||
8 | |||
9 | Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> | ||
10 | --- | ||
11 | CMakeLists.txt | 6 ++++++ | ||
12 | 1 file changed, 6 insertions(+) | ||
13 | |||
14 | diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
15 | index 572d044..90e797a 100644 | ||
16 | --- a/CMakeLists.txt | ||
17 | +++ b/CMakeLists.txt | ||
18 | @@ -63,6 +63,8 @@ include_directories("${gmock_SOURCE_DIR}/include" | ||
19 | # Test sources. | ||
20 | "${gtest_SOURCE_DIR}") | ||
21 | |||
22 | +install(DIRECTORY ${gmock_SOURCE_DIR}/include/gmock DESTINATION include) | ||
23 | + | ||
24 | ######################################################################## | ||
25 | # | ||
26 | # Defines the gmock & gmock_main libraries. User tests should link | ||
27 | @@ -82,6 +84,10 @@ cxx_library(gmock_main | ||
28 | src/gmock-all.cc | ||
29 | src/gmock_main.cc) | ||
30 | |||
31 | + | ||
32 | +install(TARGETS gmock DESTINATION lib) | ||
33 | +install(TARGETS gmock_main DESTINATION lib) | ||
34 | + | ||
35 | ######################################################################## | ||
36 | # | ||
37 | # Google Mock's own tests. | ||
38 | -- | ||
39 | 1.9.1 | ||
40 | |||
diff --git a/meta-oe/recipes-test/gmock/gmock/cmake-gmock.pc.in-Add-pkg-config-support.patch b/meta-oe/recipes-test/gmock/gmock/cmake-gmock.pc.in-Add-pkg-config-support.patch new file mode 100644 index 000000000..aa38fe49f --- /dev/null +++ b/meta-oe/recipes-test/gmock/gmock/cmake-gmock.pc.in-Add-pkg-config-support.patch | |||
@@ -0,0 +1,56 @@ | |||
1 | From 45661183a7c78d8c4f75adcf53c6ddd663dc8b2d Mon Sep 17 00:00:00 2001 | ||
2 | From: Mario Domenech Goulart <mario@ossystems.com.br> | ||
3 | Date: Mon, 20 Oct 2014 17:12:58 -0200 | ||
4 | Subject: [PATCH] CMakeLists, gmock.pc.in: Add pkg-config support | ||
5 | Organization: O.S. Systems Software LTDA. | ||
6 | |||
7 | Signed-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 | |||
14 | diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
15 | index 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. | ||
39 | diff --git a/gmock.pc.in b/gmock.pc.in | ||
40 | new file mode 100644 | ||
41 | index 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 | -- | ||
55 | 1.9.1 | ||
56 | |||
diff --git a/meta-oe/recipes-test/gmock/gmock_1.7.0.bb b/meta-oe/recipes-test/gmock/gmock_1.7.0.bb new file mode 100644 index 000000000..bd5cf4e20 --- /dev/null +++ b/meta-oe/recipes-test/gmock/gmock_1.7.0.bb | |||
@@ -0,0 +1,23 @@ | |||
1 | DESCRIPTION = "Google C++ Mocking Framework" | ||
2 | SECTION = "libs" | ||
3 | HOMEPAGE = "http://code.google.com/p/googlemock/" | ||
4 | LICENSE = "BSD-3-Clause" | ||
5 | LIC_FILES_CHKSUM = "file://LICENSE;md5=cbbd27594afd089daa160d3a16dd515a" | ||
6 | |||
7 | SRC_URI = "\ | ||
8 | http://googlemock.googlecode.com/files/${BPN}-${PV}.zip \ | ||
9 | file://cmake-Add-install-command-for-libraries-and-headers.patch \ | ||
10 | file://cmake-gmock.pc.in-Add-pkg-config-support.patch \ | ||
11 | " | ||
12 | |||
13 | SRC_URI[md5sum] = "073b984d8798ea1594f5e44d85b20d66" | ||
14 | SRC_URI[sha256sum] = "26fcbb5925b74ad5fc8c26b0495dfc96353f4d553492eb97e85a8a6d2f43095b" | ||
15 | |||
16 | inherit lib_package cmake | ||
17 | |||
18 | ALLOW_EMPTY_${PN} = "1" | ||
19 | ALLOW_EMPTY_${PN}-dbg = "1" | ||
20 | |||
21 | RDEPENDS_${PN}-dev += "${PN}-staticdev" | ||
22 | |||
23 | BBCLASSEXTEND = "nativesdk" | ||