• Skip to sidebar navigation
  • Skip to content

Bitbucket

  • More
    ProjectsRepositories
  • Help
    • Online help
    • Learn Git
    • Welcome to Bitbucket
    • Keyboard shortcuts
  • Log In
Alexander Dahl
  1. Alexander Dahl

buildroot

Public
Actions
  • Clone
  • Compare

Learn more about cloning repositories

You have read-only access

Navigation
  • Source
  • Commits
  • Branches
  • All Branches Graph
  • Forks
  1. Alexander Dahl
  2. buildroot

Source

buildroot/package/gtest/gtest.mk
Thomas PetazzoniThomas Petazzoni committed 39186b5f5ac25 Apr 2015
Raw file
Source viewDiff to previous
 
1
################################################################################
2
#
3
# gtest
4
#
5
################################################################################
6
​
7
GTEST_VERSION = 1.7.0
8
GTEST_SOURCE = gtest-$(GTEST_VERSION).zip
9
GTEST_SITE = http://googletest.googlecode.com/files
10
GTEST_INSTALL_STAGING = YES
11
GTEST_INSTALL_TARGET = NO
12
GTEST_LICENSE = BSD-3c
13
GTEST_LICENSE_FILES = LICENSE
14
​
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.
19
#
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
23
​
24
define GTEST_EXTRACT_CMDS
25
    $(UNZIP) $(DL_DIR)/$(GTEST_SOURCE) -d $(BUILD_DIR)
26
endef
27
​
28
define GTEST_INSTALL_STAGING_CMDS
29
    $(INSTALL) -D -m 0755 $(@D)/libgtest.a $(STAGING_DIR)/usr/lib/libgtest.a
30
    $(INSTALL) -D -m 0755 $(@D)/libgtest_main.a $(STAGING_DIR)/usr/lib/libgtest_main.a
31
    $(INSTALL) -d -m 0755 $(STAGING_DIR)/usr/include/gtest/
32
    cp -rp $(@D)/include/gtest/* $(STAGING_DIR)/usr/include/gtest/
33
    # Generate the gtest-config script manually, since the CMake
34
    # build system is not doing it.
35
    sed 's%@PACKAGE_TARNAME@%gtest%;\
36
        s%@PACKAGE_VERSION@%$(GTEST_VERSION)%;\
37
        s%@prefix@%$(STAGING_DIR)/usr%;\
38
        s%@exec_prefix@%$(STAGING_DIR)/usr%;\
39
        s%@libdir@%$(STAGING_DIR)/usr/lib%;\
40
        s%@includedir@%$(STAGING_DIR)/usr/include%;\
41
        s%@bindir@%$(STAGING_DIR)/usr/bin%;\
42
        s%@PTHREAD_CFLAGS@%%;\
43
        s%@PTHREAD_LIBS@%-lpthread%;' \
44
        $(@D)/scripts/gtest-config.in \
45
        > $(STAGING_DIR)/usr/bin/gtest-config
46
    chmod +x $(STAGING_DIR)/usr/bin/gtest-config
47
endef
48
​
49
$(eval $(cmake-package))
  • Git repository management for enterprise teams powered by Atlassian Bitbucket
  • Atlassian Bitbucket v6.7.2
  • Documentation
  • Request a feature
  • About
  • Contact Atlassian
Atlassian

Everything looks good. We'll let you know here if there's anything you should know about.