# - Try to find LIBOPENCV
# Once done, this will define
#
# LIBOPENCV_FOUND - system has LIBOPENCV
# LIBOPENCV_INCLUDE_DIR - the LIBOPENCV include directories
# LIBOPENCV_LIBRARIES - link these to use LIBOPENCV
FIND_PATH( LIOPENCV_INCLUDE_DIR opencv2/opencv.hpp
/usr/include
/usr/local/include
/opt/local/include
${CMAKE_SOURCE_DIR}/includes
)
FIND_LIBRARY( LIBOPENCV_LIBRARY opencv_world310d
opencv_world310
/usr/libs
/usr/local/lib
/opt/local/lib
${CMAKE_SOURCE_DIR}/libs
)
IF(LIBOPENCV_INCLUDE_DIR AND LIBOPENCV_LIBRARY)
SET( LIBOPENCV_FOUND TRUE )
SET( LIBOPENCV_LIBRARIES ${LIBOPENCV_LIBRARY} )
ENDIF(LIBOPENCV_INCLUDE_DIR AND LIBOPENCV_LIBRARY)
IF(LIBOPENCV_FOUND)
IF(NOT LIBOPENCV_FIND_QUIETLY)
MESSAGE(STATUS "Found LIBOPENCV: ${LIBOPENCV_LIBRARY}")
ENDIF(NOT LIBOPENCV_FIND_QUIETLY)
ELSE(LIBOPENCV_FOUND)
IF(LIBOPENCV_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not findLIBOPENCV")
ENDIF(LIBOPENCV_FIND_REQUIRED)
ENDIF(LIBOPENCV_FOUND)
版权声明:本文为BigTail_cat原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。