diff options
author | Dan Albert <danalbert@google.com> | 2016-11-14 21:27:05 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2016-11-14 21:27:05 +0000 |
commit | 192dd54bbd15c048a6478e4e8585a7e2603b55ce (patch) | |
tree | 859140d1a2e54d78bb47a8d31463cdb6425f2925 | |
parent | 693afab029b3eacd33a7a0e9cdfb44ec75b0e59a (diff) | |
parent | 5d2a1d9b42945f9342bc9a4d36040b0a6871098a (diff) | |
download | googletest-192dd54bbd15c048a6478e4e8585a7e2603b55ce.tar.gz |
Merge "Fix NDK modules." am: 766bcc63f8 am: 90bc60c06c
am: 5d2a1d9b42
Change-Id: Iff6004e69eb09f78480108c29587b1093af9f9c0
-rw-r--r-- | googletest/Android.mk | 49 |
1 files changed, 45 insertions, 4 deletions
diff --git a/googletest/Android.mk b/googletest/Android.mk index 1e1a3ca3..9f4526bb 100644 --- a/googletest/Android.mk +++ b/googletest/Android.mk @@ -110,22 +110,63 @@ ifdef NDK_ROOT include $(CLEAR_VARS) LOCAL_MODULE := libgtest -LOCAL_CPP_EXTENSION := .cc LOCAL_SRC_FILES := src/gtest-all.cc LOCAL_C_INCLUDES := $(LOCAL_PATH)/src $(LOCAL_PATH)/include LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include -LOCAL_RTTI_FLAG := -frtti LOCAL_CPP_FEATURES := rtti include $(BUILD_STATIC_LIBRARY) +# Note: Unlike the platform, libgtest_main carries a dependency on libgtest. +# Users don't need to manually depend on both. include $(CLEAR_VARS) LOCAL_MODULE := libgtest_main +LOCAL_SRC_FILES := src/gtest_main.cc +LOCAL_C_INCLUDES := $(LOCAL_PATH)/src $(LOCAL_PATH)/include +LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include +LOCAL_CPP_FEATURES := rtti +LOCAL_STATIC_LIBRARIES := libgtest +include $(BUILD_STATIC_LIBRARY) + +# These are the old names of these libraries. They don't match the platform or +# the upstream build, but we've been requiring that people put them in their NDK +# makefiles for years. + +include $(CLEAR_VARS) +LOCAL_MODULE := googletest_static +LOCAL_SRC_FILES := src/gtest-all.cc +LOCAL_C_INCLUDES := $(LOCAL_PATH)/src $(LOCAL_PATH)/include +LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include +LOCAL_CPP_FEATURES := rtti +include $(BUILD_STATIC_LIBRARY) + +include $(CLEAR_VARS) +LOCAL_MODULE := libgoogletest_main LOCAL_CPP_EXTENSION := .cc LOCAL_SRC_FILES := src/gtest_main.cc LOCAL_C_INCLUDES := $(LOCAL_PATH)/src $(LOCAL_PATH)/include -LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include -LOCAL_RTTI_FLAG := -frtti +LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include +LOCAL_CPP_FEATURES := rtti +LOCAL_STATIC_LIBRARIES := libgtest +include $(BUILD_STATIC_LIBRARY) + +# The NDK used to include shared versions of these libraries, for some reason. + +include $(CLEAR_VARS) +LOCAL_MODULE := googletest_shared +LOCAL_SRC_FILES := src/gtest-all.cc +LOCAL_C_INCLUDES := $(LOCAL_PATH)/src $(LOCAL_PATH)/include +LOCAL_CFLAGS := -DGTEST_CREATE_SHARED_LIBRARY +LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include +LOCAL_CPP_FEATURES := rtti +include $(BUILD_SHARED_LIBRARY) + +include $(CLEAR_VARS) +LOCAL_MODULE := googletest_main_shared +LOCAL_SRC_FILES := src/gtest_main.cc +LOCAL_C_INCLUDES := $(LOCAL_PATH)/src $(LOCAL_PATH)/include +LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include LOCAL_CPP_FEATURES := rtti +LOCAL_SHARED_LIBRARIES := googletest_shared include $(BUILD_STATIC_LIBRARY) else |