From 64d679ecb4baddfac73f51f48b2fca6abe5407aa Mon Sep 17 00:00:00 2001 From: Alexander Smorkalov Date: Fri, 21 Mar 2014 18:20:57 +0400 Subject: [PATCH] Added guard to prevent from gpu module redefinition in OpenCV.mk --- cmake/templates/OpenCV.mk.in | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/cmake/templates/OpenCV.mk.in b/cmake/templates/OpenCV.mk.in index 16fc4c9ccb..77229ecf5e 100644 --- a/cmake/templates/OpenCV.mk.in +++ b/cmake/templates/OpenCV.mk.in @@ -152,11 +152,14 @@ ifeq ($(OPENCV_MK_$(OPENCV_TARGET_ARCH_ABI)_ALREADY_INCLUDED),) OPENCV_MK_$(OPENCV_TARGET_ARCH_ABI)_ALREADY_INCLUDED:=on endif -ifeq ($(OPENCV_USE_GPU_MODULE),on) - include $(CLEAR_VARS) - LOCAL_MODULE:=opencv_gpu - LOCAL_SRC_FILES:=$(OPENCV_LIBS_DIR)/libopencv_gpu.a - include $(PREBUILT_STATIC_LIBRARY) +ifeq ($(OPENCV_MK_$(OPENCV_TARGET_ARCH_ABI)_GPU_ALREADY_INCLUDED),) + ifeq ($(OPENCV_USE_GPU_MODULE),on) + include $(CLEAR_VARS) + LOCAL_MODULE:=opencv_gpu + LOCAL_SRC_FILES:=$(OPENCV_LIBS_DIR)/libopencv_gpu.a + include $(PREBUILT_STATIC_LIBRARY) + endif + OPENCV_MK_$(OPENCV_TARGET_ARCH_ABI)_GPU_ALREADY_INCLUDED:=on endif ifeq ($(OPENCV_LOCAL_CFLAGS),)