Merge pull request #6265 from huang-qiao:master

This commit is contained in:
Alexander Alekhin 2016-04-06 04:51:58 +00:00
commit 7783836fff
2 changed files with 11 additions and 2 deletions

View File

@ -109,7 +109,12 @@ if(NOT OpenCV_FIND_QUIETLY)
message(STATUS "OpenCV STATIC: ${OpenCV_STATIC}")
endif()
get_filename_component(OpenCV_CONFIG_PATH "${CMAKE_CURRENT_LIST_FILE}" PATH CACHE)
if(CMAKE_VERSION VERSION_LESS "2.8.12")
get_filename_component(OpenCV_CONFIG_PATH "${CMAKE_CURRENT_LIST_FILE}" PATH CACHE)
else()
get_filename_component(OpenCV_CONFIG_PATH "${CMAKE_CURRENT_LIST_FILE}" DIRECTORY CACHE)
endif()
if(OpenCV_RUNTIME AND OpenCV_ARCH)
if(OpenCV_STATIC AND EXISTS "${OpenCV_CONFIG_PATH}/${OpenCV_ARCH}/${OpenCV_RUNTIME}/staticlib/OpenCVConfig.cmake")
if(OpenCV_CUDA AND EXISTS "${OpenCV_CONFIG_PATH}/gpu/${OpenCV_ARCH}/${OpenCV_RUNTIME}/staticlib/OpenCVConfig.cmake")

View File

@ -110,7 +110,11 @@ set(OpenCV_SHARED @BUILD_SHARED_LIBS@)
set(OpenCV_USE_MANGLED_PATHS @OpenCV_USE_MANGLED_PATHS_CONFIGCMAKE@)
# Extract the directory where *this* file has been installed (determined at cmake run-time)
get_filename_component(OpenCV_CONFIG_PATH "${CMAKE_CURRENT_LIST_FILE}" PATH CACHE)
if(CMAKE_VERSION VERSION_LESS "2.8.12")
get_filename_component(OpenCV_CONFIG_PATH "${CMAKE_CURRENT_LIST_FILE}" PATH CACHE)
else()
get_filename_component(OpenCV_CONFIG_PATH "${CMAKE_CURRENT_LIST_FILE}" DIRECTORY CACHE)
endif()
if(NOT WIN32 OR ANDROID)
if(ANDROID)