ref: 64c2164df9c71a0421e95e29c035b00dfb1df56f
parent: fc06d8783b7032e0c631a07700d9425645c0b3ba
author: Martin Storsjö <[email protected]>
date: Thu Feb 20 07:07:57 EST 2014
Fix building the gtest library when targeting android The main purpose is to make sure that the build doesn't fail if the build directory contains the gtest subdirectory, although the unittests also could be run on a device.
--- a/Makefile
+++ b/Makefile
@@ -67,11 +67,11 @@
-Icodec/processing/interface \
-Icodec/processing/src/common
-GTEST_INCLUDES = \
+GTEST_INCLUDES += \
-Igtest \
-Igtest/include
-CODEC_UNITTEST_INCLUDES = \
+CODEC_UNITTEST_INCLUDES += \
-Igtest/include
H264DEC_INCLUDES = $(DECODER_INCLUDES) -Icodec/console/dec/inc
--- a/build/platform-android.mk
+++ b/build/platform-android.mk
@@ -39,6 +39,12 @@
CFLAGS += -DLINUX -fpic --sysroot=$(SYSROOT) -fno-rtti -fno-exceptions
LDFLAGS += --sysroot=$(SYSROOT) -Wl,--no-undefined -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -Wl,-soname,libwels.so
+STL_INCLUDES = \
+ -I$(NDKROOT)/sources/cxx-stl/gnu-libstdc++/$(GCCVERSION)/include \
+ -I$(NDKROOT)/sources/cxx-stl/gnu-libstdc++/$(GCCVERSION)/libs/$(APP_ABI)/include
+
+GTEST_INCLUDES = $(STL_INCLUDES)
+CODEC_UNITTEST_INCLUDES = $(STL_INCLUDES)
binaries : decdemo encdemo