Fixed incorrectly merged patch.

This commit is contained in:
Andrey Kamaev 2012-02-09 20:22:36 +00:00
parent 3ef5bfa185
commit 68a54e7f3c
4 changed files with 21 additions and 6 deletions

View File

@ -44,6 +44,10 @@ macro(ocv_generate_dependencies_map_configmake suffix configuration)
list(GET OPENCV_LIBS_TO_PROCESS 0 __ocv_lib)
get_target_property(__libname ${__ocv_lib} LOCATION_${configuration})
get_filename_component(__libname "${__libname}" NAME)
if(WIN32)
string(REGEX REPLACE "[.]dll$" ".lib" __libname "${__libname}")
endif()
set(OPENCV_DEPENDENCIES_MAP_${suffix} "${OPENCV_DEPENDENCIES_MAP_${suffix}}set(OpenCV_${__ocv_lib}_LIBNAME_${suffix} \"${__libname}\")\n")
set(OPENCV_DEPENDENCIES_MAP_${suffix} "${OPENCV_DEPENDENCIES_MAP_${suffix}}set(OpenCV_${__ocv_lib}_DEPS_${suffix} ${${__ocv_lib}_MODULE_DEPS_${suffix}})\n")

View File

@ -18,7 +18,7 @@
# This file will define the following variables:
# -
# - OpenCV_LIBS : The list of libraries to links against.
# - OpenCV_LIB_DIR : The directory where lib files are. Calling LINK_DIRECTORIES
# - OpenCV_LIB_DIR : The directory(es) where lib files are. Calling LINK_DIRECTORIES
# with this path is NOT needed.
# - OpenCV_INCLUDE_DIRS : The OpenCV include directories.
# - OpenCV_COMPUTE_CAPABILITIES : The version of compute capability
@ -35,7 +35,6 @@
# - OpenCV_LIB_COMPONENTS
# - OpenCV_USE_MANGLED_PATHS
# - OpenCV_HAVE_ANDROID_CAMERA
# - OpenCV_SOURCE_PATH
#
# =================================================================================================
@ -103,7 +102,13 @@ SET(OpenCV2_INCLUDE_DIRS @CMAKE_OPENCV2_INCLUDE_DIRS_CONFIGCMAKE@)
if(OpenCV2_INCLUDE_DIRS)
include_directories(${OpenCV2_INCLUDE_DIRS})
list(APPEND OpenCV_INCLUDE_DIRS ${OpenCV2_INCLUDE_DIRS})
if(MSVC)
set(OpenCV_AddDebugRelease FALSE)
if(MSVC OR CMAKE_GENERATOR MATCHES Xcode)
set(OpenCV_AddDebugRelease TRUE)
endif()
if(OpenCV_AddDebugRelease)
set(OpenCV_LIB_DIR_OPT "${OpenCV_LIB_DIR_OPT}/Release")
set(OpenCV_LIB_DIR_DBG "${OpenCV_LIB_DIR_DBG}/Debug")
set(OpenCV_3RDPARTY_LIB_DIR_OPT "${OpenCV_3RDPARTY_LIB_DIR_OPT}/Release")
@ -247,4 +252,9 @@ endif()
# ==============================================================
# Compatibility stuff
# ==============================================================
if(CMAKE_BUILD_TYPE MATCHES "Debug")
SET(OpenCV_LIB_DIR ${OpenCV_LIB_DIR_DBG} ${OpenCV_3RDPARTY_LIB_DIR_DBG})
else()
SET(OpenCV_LIB_DIR ${OpenCV_LIB_DIR_OPT} ${OpenCV_3RDPARTY_LIB_DIR_OPT})
endif()
set(OpenCV_LIBRARIES ${OpenCV_LIBS})

View File

@ -20,12 +20,14 @@ if(ANDROID_SOURCE_TREE)
endif()
if(NOT "${ANDROID_VERSION}" STREQUAL "")
SET(BUILD_ANDROID_CAMERA_WRAPPER ON)
set(ANDROID_VERSION "${ANDROID_VERSION}" CACHE INTERNAL "Version of Android source tree")
endif()
endif()
set(BUILD_ANDROID_CAMERA_WRAPPER ${BUILD_ANDROID_CAMERA_WRAPPER} CACHE INTERNAL "Build new wrapper for Android")
MARK_AS_ADVANCED(ANDROID_SOURCE_TREE)
# process wrapper libs
if (BUILD_ANDROID_CAMERA_WRAPPER)
if(BUILD_ANDROID_CAMERA_WRAPPER)
add_subdirectory(camera_wrapper)
else()
file(GLOB camera_wrappers "${CMAKE_CURRENT_SOURCE_DIR}/../../3rdparty/lib/${ANDROID_NDK_ABI_NAME}/libnative_camera_r*.so")

View File

@ -210,8 +210,7 @@ if(APPLE)
endif()
endif(APPLE)
set(OPENCV_MODULE_ANDROIDCAMERA "ON") #TODO: fix it
if(HAVE_opencv_androidcamera AND OPENCV_MODULE_ANDROIDCAMERA)
if(HAVE_opencv_androidcamera)
set(highgui_srcs ${highgui_srcs} src/cap_android.cpp)
add_definitions(-DHAVE_ANDROID_NATIVE_CAMERA)#TODO: remove this line
endif()