depends: gtest: update to 1.14.0, clean up package definition
This commit is contained in:
parent
c8214782fb
commit
acf810f8fd
|
@ -172,6 +172,18 @@ endif
|
|||
ifneq ($($(1)_ldflags),)
|
||||
$(1)_autoconf += LDFLAGS="$$($(1)_ldflags)"
|
||||
endif
|
||||
|
||||
$(1)_cmake=env CC="$$($(1)_cc)" \
|
||||
CFLAGS="$$($(1)_cppflags) $$($(1)_cflags)" \
|
||||
CXX="$$($(1)_cxx)" \
|
||||
CXXFLAGS="$$($(1)_cppflags) $$($(1)_cxxflags)" \
|
||||
LDFLAGS="$$($(1)_ldflags)" \
|
||||
cmake -DCMAKE_INSTALL_PREFIX:PATH="$$($($(1)_type)_prefix)" $$($(1)_config_opts)
|
||||
ifneq ($(host),$(build))
|
||||
$(1)_cmake += -DCMAKE_SYSTEM_NAME=$($(host_os)_cmake_system)
|
||||
$(1)_cmake += -DCMAKE_C_COMPILER_TARGET=$(host)
|
||||
$(1)_cmake += -DCMAKE_CXX_COMPILER_TARGET=$(host)
|
||||
endif
|
||||
endef
|
||||
|
||||
define int_add_cmds
|
||||
|
|
|
@ -1,39 +1,23 @@
|
|||
package=gtest
|
||||
$(package)_version=1.8.1
|
||||
$(package)_version=1.14.0
|
||||
$(package)_download_path=https://github.com/google/googletest/archive/
|
||||
$(package)_download_file=release-$($(package)_version).tar.gz
|
||||
$(package)_download_file=v$($(package)_version).tar.gz
|
||||
$(package)_file_name=$(package)-$($(package)_version).tar.gz
|
||||
$(package)_sha256_hash=9bf1fe5182a604b4135edc1a425ae356c9ad15e9b23f9f12a02e80184c3a249c
|
||||
$(package)_cxxflags=-std=c++11
|
||||
$(package)_sha256_hash=8ad598c73ad796e0d8280b082cebd82a630d73e73cd3c70057938a6501bba5d7
|
||||
$(package)_cxxflags=-std=c++14
|
||||
$(package)_cxxflags_linux=-fPIC
|
||||
|
||||
define $(package)_config_cmds
|
||||
cd googletest && \
|
||||
CC="$(host_prefix)/native/bin/$($(package)_cc)" \
|
||||
CXX="$(host_prefix)/native/bin/$($(package)_cxx)" \
|
||||
AR="$(host_prefix)/native/bin/$($(package)_ar)" \
|
||||
RANLIB="$(host_prefix)/native/bin/$($(package)_ranlib)" \
|
||||
LIBTOOL="$(host_prefix)/native/bin/$($(package)_libtool)" \
|
||||
CXXFLAGS="$($(package)_cxxflags)" \
|
||||
CCFLAGS="$($(package)_ccflags)" \
|
||||
CPPFLAGS="$($(package)_cppflags)" \
|
||||
CFLAGS="$($(package)_cflags) $($(package)_cppflags)" \
|
||||
LDLAGS="$($(package)_ldflags)" \
|
||||
cmake -DCMAKE_INSTALL_PREFIX=$(build_prefix) \
|
||||
-DTOOLCHAIN_PREFIX=$(host_toolchain) \
|
||||
-DCMAKE_AR="$(host_prefix)/native/bin/$($(package)_ar)" \
|
||||
-DCMAKE_RANLIB="$(host_prefix)/native/bin/$($(package)_ranlib)" \
|
||||
-DCMAKE_CXX_FLAGS_DEBUG=ON
|
||||
$($(package)_cmake) -S . -B .
|
||||
endef
|
||||
# -DCMAKE_TOOLCHAIN_FILE=$(HOST)/share/toolchain.cmake
|
||||
|
||||
define $(package)_build_cmds
|
||||
cd googletest && CC="$(host_prefix)/native/bin/$($(package)_cc)" $(MAKE)
|
||||
$(MAKE)
|
||||
endef
|
||||
|
||||
define $(package)_stage_cmds
|
||||
mkdir $($(package)_staging_prefix_dir)/lib $($(package)_staging_prefix_dir)/include &&\
|
||||
cp googletest/libgtest.a $($(package)_staging_prefix_dir)/lib/ &&\
|
||||
cp googletest/libgtest_main.a $($(package)_staging_prefix_dir)/lib/ &&\
|
||||
cp lib/libgtest.a $($(package)_staging_prefix_dir)/lib/ &&\
|
||||
cp lib/libgtest_main.a $($(package)_staging_prefix_dir)/lib/ &&\
|
||||
cp -a googletest/include/* $($(package)_staging_prefix_dir)/include/
|
||||
endef
|
||||
|
|
Loading…
Reference in New Issue