Updating opencv module definition in cmake (continued)

pull/13383/head
Andrey Kamaev 13 years ago
parent 9469f65094
commit ea5d01558c
  1. 39
      modules/androidcamera/CMakeLists.txt
  2. 10
      modules/stitching/CMakeLists.txt

@ -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})

@ -2,8 +2,10 @@ if(IOS)
return() return()
endif() endif()
if(ANDROID) set(DEPS opencv_core opencv_imgproc opencv_features2d opencv_calib3d opencv_flann opencv_objdetect)
define_opencv_module(stitching opencv_core opencv_imgproc opencv_features2d opencv_calib3d opencv_flann opencv_objdetect) if(NOT ANDROID)
else() set(DEPS ${DEPS} opencv_gpu)
define_opencv_module(stitching opencv_core opencv_imgproc opencv_features2d opencv_calib3d opencv_flann opencv_objdetect opencv_gpu)
endif() endif()
define_opencv_module(stitching ${DEPS})

Loading…
Cancel
Save