Merge pull request #2274 from jet47:android-mk-fix

This commit is contained in:
Roman Donchenko 2014-02-04 18:59:13 +04:00 committed by OpenCV Buildbot
commit ccda4bf008

View File

@ -2,6 +2,13 @@
# you might need to define NDK_USE_CYGPATH=1 before calling the ndk-build # you might need to define NDK_USE_CYGPATH=1 before calling the ndk-build
USER_LOCAL_PATH:=$(LOCAL_PATH) USER_LOCAL_PATH:=$(LOCAL_PATH)
USER_LOCAL_C_INCLUDES:=$(LOCAL_C_INCLUDES)
USER_LOCAL_CFLAGS:=$(LOCAL_CFLAGS)
USER_LOCAL_STATIC_LIBRARIES:=$(LOCAL_STATIC_LIBRARIES)
USER_LOCAL_SHARED_LIBRARIES:=$(LOCAL_SHARED_LIBRARIES)
USER_LOCAL_LDLIBS:=$(LOCAL_LDLIBS)
LOCAL_PATH:=$(subst ?,,$(firstword ?$(subst \, ,$(subst /, ,$(call my-dir))))) LOCAL_PATH:=$(subst ?,,$(firstword ?$(subst \, ,$(subst /, ,$(call my-dir)))))
OPENCV_TARGET_ARCH_ABI:=$(TARGET_ARCH_ABI) OPENCV_TARGET_ARCH_ABI:=$(TARGET_ARCH_ABI)
@ -136,6 +143,13 @@ ifeq ($(OPENCV_LOCAL_CFLAGS),)
endif endif
include $(CLEAR_VARS) include $(CLEAR_VARS)
LOCAL_C_INCLUDES:=$(USER_LOCAL_C_INCLUDES)
LOCAL_CFLAGS:=$(USER_LOCAL_CFLAGS)
LOCAL_STATIC_LIBRARIES:=$(USER_LOCAL_STATIC_LIBRARIES)
LOCAL_SHARED_LIBRARIES:=$(USER_LOCAL_SHARED_LIBRARIES)
LOCAL_LDLIBS:=$(USER_LOCAL_LDLIBS)
LOCAL_C_INCLUDES += $(OPENCV_LOCAL_C_INCLUDES) LOCAL_C_INCLUDES += $(OPENCV_LOCAL_C_INCLUDES)
LOCAL_CFLAGS += $(OPENCV_LOCAL_CFLAGS) LOCAL_CFLAGS += $(OPENCV_LOCAL_CFLAGS)
@ -157,7 +171,7 @@ LOCAL_LDLIBS += $(foreach lib,$(OPENCV_EXTRA_COMPONENTS), -l$(lib))
ifeq ($(OPENCV_USE_GPU_MODULE),on) ifeq ($(OPENCV_USE_GPU_MODULE),on)
LOCAL_STATIC_LIBRARIES+=libopencv_gpu LOCAL_STATIC_LIBRARIES+=libopencv_gpu
LOCAL_LDLIBS += -L$(CUDA_TOOLKIT_DIR)/lib $(foreach lib, $(CUDA_RUNTIME_LIBS), -l$(lib)) LOCAL_LDLIBS += -L$(CUDA_TOOLKIT_DIR)/targets/armv7-linux-androideabi/lib $(foreach lib, $(CUDA_RUNTIME_LIBS), -l$(lib))
endif endif
#restore the LOCAL_PATH #restore the LOCAL_PATH