2012-01-25 17:04:49 +08:00
|
|
|
IF(NOT ANDROID OR NOT WITH_ANDROID_CAMERA)
|
|
|
|
return()
|
2011-06-17 02:00:41 +08:00
|
|
|
ENDIF()
|
|
|
|
|
2012-01-25 21:41:12 +08:00
|
|
|
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/camera_wrapper")
|
|
|
|
set(OPENCV_ANDROIDCAMERA_MODULE_TYPE STATIC)
|
|
|
|
define_opencv_moduleEx(androidcamera INTERNAL log dl)
|
|
|
|
|
2011-06-17 02:00:41 +08:00
|
|
|
if (BUILD_ANDROID_CAMERA_WRAPPER)
|
|
|
|
add_subdirectory(camera_wrapper)
|
2012-01-25 21:41:12 +08:00
|
|
|
else()
|
2011-11-16 22:32:10 +08:00
|
|
|
file(GLOB camera_wrappers "${CMAKE_CURRENT_SOURCE_DIR}/../../3rdparty/lib/${ANDROID_NDK_ABI_NAME}/libnative_camera_r*.so")
|
2011-06-17 21:52:55 +08:00
|
|
|
|
|
|
|
foreach(wrapper ${camera_wrappers})
|
|
|
|
ADD_CUSTOM_COMMAND(
|
|
|
|
TARGET ${the_target}
|
|
|
|
POST_BUILD
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy "${wrapper}" "${LIBRARY_OUTPUT_PATH}"
|
|
|
|
)
|
|
|
|
get_filename_component(wrapper_name "${wrapper}" NAME)
|
|
|
|
install(FILES "${LIBRARY_OUTPUT_PATH}/${wrapper_name}"
|
2011-06-24 23:40:27 +08:00
|
|
|
DESTINATION ${OPENCV_LIB_INSTALL_PATH}
|
2011-06-17 21:52:55 +08:00
|
|
|
COMPONENT main)
|
|
|
|
endforeach()
|
2011-06-23 20:00:09 +08:00
|
|
|
endif()
|