|
|
@ -2,42 +2,13 @@ IF(NOT ANDROID OR NOT WITH_ANDROID_CAMERA) |
|
|
|
return() |
|
|
|
return() |
|
|
|
ENDIF() |
|
|
|
ENDIF() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/camera_wrapper") |
|
|
|
|
|
|
|
set(OPENCV_ANDROIDCAMERA_MODULE_TYPE STATIC) |
|
|
|
|
|
|
|
define_opencv_moduleEx(androidcamera INTERNAL log dl) |
|
|
|
|
|
|
|
|
|
|
|
if (BUILD_ANDROID_CAMERA_WRAPPER) |
|
|
|
if (BUILD_ANDROID_CAMERA_WRAPPER) |
|
|
|
add_subdirectory(camera_wrapper) |
|
|
|
add_subdirectory(camera_wrapper) |
|
|
|
endif() |
|
|
|
else() |
|
|
|
|
|
|
|
|
|
|
|
project(opencv_androidcamera) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR}/include ${CMAKE_CURRENT_SOURCE_DIR}/camera_wrapper ) |
|
|
|
|
|
|
|
SET( LIBRARY_DEPS ${LIBRARY_DEPS} log dl ) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SET( the_target opencv_androidcamera ) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ADD_LIBRARY( ${the_target} STATIC src/camera_activity.cpp ) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (BUILD_SHARED_LIBS) |
|
|
|
|
|
|
|
add_definitions(-DCVAPI_EXPORTS) |
|
|
|
|
|
|
|
endif() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
TARGET_LINK_LIBRARIES( ${the_target} ${LIBRARY_DEPS} ) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SET_TARGET_PROPERTIES(${the_target} PROPERTIES |
|
|
|
|
|
|
|
DEBUG_POSTFIX "${OPENCV_DEBUG_POSTFIX}" |
|
|
|
|
|
|
|
OUTPUT_NAME "${the_target}${OPENCV_DLLVERSION}" |
|
|
|
|
|
|
|
DEFINE_SYMBOL "CVAPI_EXPORTS" |
|
|
|
|
|
|
|
ARCHIVE_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_PATH} |
|
|
|
|
|
|
|
RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH} |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
IF (NOT BUILD_SHARED_LIBS) |
|
|
|
|
|
|
|
install(TARGETS ${the_target} |
|
|
|
|
|
|
|
RUNTIME DESTINATION bin COMPONENT main |
|
|
|
|
|
|
|
ARCHIVE DESTINATION ${OPENCV_LIB_INSTALL_PATH} COMPONENT main |
|
|
|
|
|
|
|
LIBRARY DESTINATION ${OPENCV_LIB_INSTALL_PATH} COMPONENT main |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
ENDIF() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (NOT BUILD_ANDROID_CAMERA_WRAPPER) |
|
|
|
|
|
|
|
file(GLOB camera_wrappers "${CMAKE_CURRENT_SOURCE_DIR}/../../3rdparty/lib/${ANDROID_NDK_ABI_NAME}/libnative_camera_r*.so") |
|
|
|
file(GLOB camera_wrappers "${CMAKE_CURRENT_SOURCE_DIR}/../../3rdparty/lib/${ANDROID_NDK_ABI_NAME}/libnative_camera_r*.so") |
|
|
|
|
|
|
|
|
|
|
|
foreach(wrapper ${camera_wrappers}) |
|
|
|
foreach(wrapper ${camera_wrappers}) |
|
|
|