python-whoosh: bump to version 2.7.4
[buildroot-gz.git] / package / gtest / gtest.mk
blobeb30905c2afa5b2f1e9e20f6da867b062ce99d1c
1 ################################################################################
3 # gtest
5 ################################################################################
7 # Make sure this remains the same version as the gmock one
8 GTEST_VERSION = release-1.7.0
9 GTEST_SITE = $(call github,google,googletest,$(GTEST_VERSION))
10 GTEST_INSTALL_STAGING = YES
11 GTEST_INSTALL_TARGET = NO
12 GTEST_LICENSE = BSD-3c
13 GTEST_LICENSE_FILES = LICENSE
15 # While it is possible to build gtest as shared library, using this gtest shared
16 # library requires to set some special configure option in the project using
17 # gtest.
18 # So, force to build gtest as a static library.
20 # For further details, refer to the explaination given in the README file from
21 # the gtest sources.
22 GTEST_CONF_OPTS = -DBUILD_SHARED_LIBS=OFF
24 define GTEST_INSTALL_STAGING_CMDS
25 $(INSTALL) -D -m 0755 $(@D)/libgtest.a $(STAGING_DIR)/usr/lib/libgtest.a
26 $(INSTALL) -D -m 0755 $(@D)/libgtest_main.a $(STAGING_DIR)/usr/lib/libgtest_main.a
27 $(INSTALL) -d -m 0755 $(STAGING_DIR)/usr/include/gtest/
28 cp -rp $(@D)/include/gtest/* $(STAGING_DIR)/usr/include/gtest/
29 $(INSTALL) -D -m 0644 package/gtest/gtest.pc \
30 $(STAGING_DIR)/usr/lib/pkgconfig/gtest.pc
31 # Generate the gtest-config script manually, since the CMake
32 # build system is not doing it.
33 sed 's%@PACKAGE_TARNAME@%gtest%;\
34 s%@PACKAGE_VERSION@%$(GTEST_VERSION)%;\
35 s%@prefix@%$(STAGING_DIR)/usr%;\
36 s%@exec_prefix@%$(STAGING_DIR)/usr%;\
37 s%@libdir@%$(STAGING_DIR)/usr/lib%;\
38 s%@includedir@%$(STAGING_DIR)/usr/include%;\
39 s%@bindir@%$(STAGING_DIR)/usr/bin%;\
40 s%@PTHREAD_CFLAGS@%%;\
41 s%@PTHREAD_LIBS@%-lpthread%;' \
42 $(@D)/scripts/gtest-config.in \
43 > $(STAGING_DIR)/usr/bin/gtest-config
44 chmod +x $(STAGING_DIR)/usr/bin/gtest-config
45 endef
47 $(eval $(cmake-package))