Commit e50ff522 authored by Julien Malik's avatar Julien Malik

COMP: move OpenCV activation into its own cmake file

parent f5e213b6
MESSAGE(STATUS "Importing OpenCV...")
OPTION(OTB_USE_OPENCV "Use OpenCV library for classification." OFF)
MARK_AS_ADVANCED(OTB_USE_OPENCV)
IF(OTB_USE_OPENCV)
MESSAGE(STATUS " Enabling OpenCV support")
FIND_PACKAGE(OpenCV REQUIRED)
MESSAGE(STATUS " Found OpenCV ${OpenCV_VERSION_MAJOR}.${OpenCV_VERSION_MINOR}.${OpenCV_VERSION_PATCH}")
MESSAGE(STATUS " OpenCV include directory: ${OpenCV_INCLUDE_DIRS}")
INCLUDE_DIRECTORIES(${OpenCV_INCLUDE_DIRS})
ELSE()
MESSAGE(STATUS " Disabling OpenCV support (OTB_USE_OPENCV is OFF)")
ENDIF()
\ No newline at end of file
......@@ -229,15 +229,7 @@ INCLUDE(ImportSiftFast)
INCLUDE(ImportTinyXML)
INCLUDE(ImportMuParser)
INCLUDE(ImportLibKML)
OPTION(OTB_USE_OPENCV "Use OpenCV library for classification." OFF)
MARK_AS_ADVANCED(OTB_USE_OPENCV)
IF(OTB_USE_OPENCV)
FIND_PACKAGE(OpenCV)
MESSAGE(STATUS "Found OpenCV ${OpenCV_VERSION_MAJOR}.${OpenCV_VERSION_MINOR}.${OpenCV_VERSION_PATCH}")
MESSAGE(STATUS "OpenCV include directory: ${OpenCV_INCLUDE_DIRS}")
INCLUDE_DIRECTORIES(${OpenCV_INCLUDE_DIRS})
ENDIF(OTB_USE_OPENCV)
INCLUDE(ImportOpenCV)
INCLUDE_DIRECTORIES (
${OTB_BINARY_DIR}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment