Updating opencv module definition in cmake (continued)

This commit is contained in:
Andrey Kamaev 2012-01-25 13:41:12 +00:00
parent 9469f65094
commit ea5d01558c
2 changed files with 11 additions and 38 deletions

View File

@ -2,42 +2,13 @@ IF(NOT ANDROID OR NOT WITH_ANDROID_CAMERA)
return()
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)
add_subdirectory(camera_wrapper)
endif()
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)
else()
file(GLOB camera_wrappers "${CMAKE_CURRENT_SOURCE_DIR}/../../3rdparty/lib/${ANDROID_NDK_ABI_NAME}/libnative_camera_r*.so")
foreach(wrapper ${camera_wrappers})

View File

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