mirror of
https://github.com/opencv/opencv.git
synced 2024-11-24 03:00:14 +08:00
android: move .a files into 'staticlibs' directory
to reduce overhead of gradle builds
This commit is contained in:
parent
cff79609c8
commit
ddb482b14a
@ -404,6 +404,7 @@ if(ANDROID)
|
||||
set(LIBRARY_OUTPUT_PATH "${OpenCV_BINARY_DIR}/lib/${ANDROID_NDK_ABI_NAME}")
|
||||
ocv_update(3P_LIBRARY_OUTPUT_PATH "${OpenCV_BINARY_DIR}/3rdparty/lib/${ANDROID_NDK_ABI_NAME}")
|
||||
ocv_update(OPENCV_LIB_INSTALL_PATH sdk/native/libs/${ANDROID_NDK_ABI_NAME})
|
||||
ocv_update(OPENCV_LIB_ARCHIVE_INSTALL_PATH sdk/native/staticlibs/${ANDROID_NDK_ABI_NAME})
|
||||
ocv_update(OPENCV_3P_LIB_INSTALL_PATH sdk/native/3rdparty/libs/${ANDROID_NDK_ABI_NAME})
|
||||
ocv_update(OPENCV_CONFIG_INSTALL_PATH sdk/native/jni)
|
||||
ocv_update(OPENCV_INCLUDE_INSTALL_PATH sdk/native/jni/include)
|
||||
@ -472,6 +473,10 @@ else()
|
||||
endif()
|
||||
ocv_update(OPENCV_JNI_BIN_INSTALL_PATH "${OPENCV_JNI_INSTALL_PATH}")
|
||||
|
||||
if(NOT OPENCV_LIB_ARCHIVE_INSTALL_PATH)
|
||||
set(OPENCV_LIB_ARCHIVE_INSTALL_PATH ${OPENCV_LIB_INSTALL_PATH})
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
# Postfix of DLLs:
|
||||
set(OPENCV_DLLVERSION "${OPENCV_VERSION_MAJOR}${OPENCV_VERSION_MINOR}${OPENCV_VERSION_PATCH}")
|
||||
|
@ -59,6 +59,7 @@ if(ANDROID)
|
||||
set(OPENCV_INCLUDE_DIRS_CONFIGCMAKE "\"${OPENCV_CONFIG_FILE_INCLUDE_DIR}\" \"${OpenCV_SOURCE_DIR}/include\" \"${OpenCV_SOURCE_DIR}/include/opencv\"")
|
||||
set(OPENCV_BASE_INCLUDE_DIR_CONFIGCMAKE "\"${OpenCV_SOURCE_DIR}\"")
|
||||
set(OPENCV_LIBS_DIR_CONFIGCMAKE "\$(OPENCV_THIS_DIR)/lib/\$(OPENCV_TARGET_ARCH_ABI)")
|
||||
set(OPENCV_LIBS_ARCHIVE_DIR_CONFIGCMAKE "\$(OPENCV_THIS_DIR)/lib/\$(OPENCV_TARGET_ARCH_ABI)")
|
||||
set(OPENCV_3RDPARTY_LIBS_DIR_CONFIGCMAKE "\$(OPENCV_THIS_DIR)/3rdparty/lib/\$(OPENCV_TARGET_ARCH_ABI)")
|
||||
|
||||
configure_file("${OpenCV_SOURCE_DIR}/cmake/templates/OpenCV.mk.in" "${CMAKE_BINARY_DIR}/OpenCV.mk" @ONLY)
|
||||
@ -70,6 +71,7 @@ if(ANDROID)
|
||||
set(OPENCV_INCLUDE_DIRS_CONFIGCMAKE "\"\$(LOCAL_PATH)/\$(OPENCV_THIS_DIR)/include/opencv\" \"\$(LOCAL_PATH)/\$(OPENCV_THIS_DIR)/include\"")
|
||||
set(OPENCV_BASE_INCLUDE_DIR_CONFIGCMAKE "")
|
||||
set(OPENCV_LIBS_DIR_CONFIGCMAKE "\$(OPENCV_THIS_DIR)/../libs/\$(OPENCV_TARGET_ARCH_ABI)")
|
||||
set(OPENCV_LIBS_ARCHIVE_DIR_CONFIGCMAKE "\$(OPENCV_THIS_DIR)/../staticlibs/\$(OPENCV_TARGET_ARCH_ABI)")
|
||||
set(OPENCV_3RDPARTY_LIBS_DIR_CONFIGCMAKE "\$(OPENCV_THIS_DIR)/../3rdparty/libs/\$(OPENCV_TARGET_ARCH_ABI)")
|
||||
|
||||
configure_file("${OpenCV_SOURCE_DIR}/cmake/templates/OpenCV.mk.in" "${CMAKE_BINARY_DIR}/unix-install/OpenCV.mk" @ONLY)
|
||||
|
@ -958,7 +958,7 @@ macro(_ocv_create_module)
|
||||
ocv_install_target(${the_module} EXPORT OpenCVModules OPTIONAL
|
||||
RUNTIME DESTINATION ${OPENCV_BIN_INSTALL_PATH} COMPONENT libs
|
||||
LIBRARY DESTINATION ${OPENCV_LIB_INSTALL_PATH} COMPONENT libs NAMELINK_SKIP
|
||||
ARCHIVE DESTINATION ${OPENCV_LIB_INSTALL_PATH} COMPONENT dev
|
||||
ARCHIVE DESTINATION ${OPENCV_LIB_ARCHIVE_INSTALL_PATH} COMPONENT dev
|
||||
)
|
||||
endif()
|
||||
if("${_target_type}" STREQUAL "SHARED_LIBRARY")
|
||||
|
@ -14,7 +14,6 @@ LOCAL_PATH:=$(subst ?,,$(firstword ?$(subst \, ,$(subst /, ,$(call my-dir)))))
|
||||
OPENCV_TARGET_ARCH_ABI:=$(TARGET_ARCH_ABI)
|
||||
OPENCV_THIS_DIR:=$(patsubst $(LOCAL_PATH)\\%,%,$(patsubst $(LOCAL_PATH)/%,%,$(call my-dir)))
|
||||
OPENCV_MK_DIR:=$(dir $(lastword $(MAKEFILE_LIST)))
|
||||
OPENCV_LIBS_DIR:=@OPENCV_LIBS_DIR_CONFIGCMAKE@
|
||||
OPENCV_3RDPARTY_LIBS_DIR:=@OPENCV_3RDPARTY_LIBS_DIR_CONFIGCMAKE@
|
||||
OPENCV_BASEDIR:=@OPENCV_BASE_INCLUDE_DIR_CONFIGCMAKE@
|
||||
OPENCV_LOCAL_C_INCLUDES:=@OPENCV_INCLUDE_DIRS_CONFIGCMAKE@
|
||||
@ -41,8 +40,10 @@ else
|
||||
endif
|
||||
|
||||
ifeq ($(OPENCV_LIB_TYPE),SHARED)
|
||||
OPENCV_LIBS_DIR:=@OPENCV_LIBS_DIR_CONFIGCMAKE@
|
||||
OPENCV_LIB_SUFFIX:=so
|
||||
else
|
||||
OPENCV_LIBS_DIR:=@OPENCV_LIBS_ARCHIVE_DIR_CONFIGCMAKE@
|
||||
OPENCV_LIB_SUFFIX:=a
|
||||
OPENCV_INSTALL_MODULES:=on
|
||||
endif
|
||||
|
Loading…
Reference in New Issue
Block a user