Commit b651b927 authored by Jeremy Tellaa's avatar Jeremy Tellaa

use cmake openCV module

parent 71078112
if(LINUX OR ANDROID)
if(LINUX)
find_library(OpenCV_CORE_LIBS NAMES "opencv_core")
find_library(OpenCV_CALIB_LIBS NAMES "opencv_calib3d")
find_library(OpenCV_FEATURES_LIBS NAMES "opencv_features2d")
find_library(OpenCV_IMGPROC_LIBS NAMES "opencv_imgproc")
find_library(OpenCV_FLANN_LIBS NAMES "opencv_flann")
find_library(OpenCV_VIDEO_LIBS NAMES "opencv_video")
else()
find_library(OpenCV_CORE_LIBS NAMES "opencv_core" PATHS ${CMAKE_EXTERNAL_DEPS}/lib NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
find_library(OpenCV_CALIB_LIBS NAMES "opencv_calib3d" PATHS ${CMAKE_EXTERNAL_DEPS}/lib NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
find_library(OpenCV_FEATURES_LIBS NAMES "opencv_features2d" PATHS ${CMAKE_EXTERNAL_DEPS}/lib NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
find_library(OpenCV_IMGPROC_LIBS NAMES "opencv_imgproc" PATHS ${CMAKE_EXTERNAL_DEPS}/lib NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
find_library(OpenCV_FLANN_LIBS NAMES "opencv_flann" PATHS ${CMAKE_EXTERNAL_DEPS}/lib NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
find_library(OpenCV_VIDEO_LIBS NAMES "opencv_video" PATHS ${CMAKE_EXTERNAL_DEPS}/lib NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
set(OpenCV_INCLUDE_DIRS ${CMAKE_EXTERNAL_DEPS}/include/opencv2)
endif()
set(OpenCV_LIBRARIES
${OpenCV_CALIB_LIBS}
${OpenCV_FEATURES_LIBS}
${OpenCV_FLANN_LIBS}
${OpenCV_VIDEO_LIBS}
${OpenCV_IMGPROC_LIBS}
${OpenCV_CORE_LIBS})
endif()
if(ANDROID)
find_library(OpenCV_HAL_LIBS NAMES "opencv_hal" PATHS ${CMAKE_EXTERNAL_DEPS}/lib NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
set(OpenCV_LIBRARIES
${OpenCV_LIBRARIES}
${OpenCV_HAL_LIBS})
endif()
if(APPLE)
if(MACPORTS)
find_package(OpenCV REQUIRED core calib3d features2d imgproc flann video PATHS /opt/local NO_DEFAULT_PATH)
else()
find_package(OpenCV REQUIRED core calib3d features2d imgproc flann video PATHS "/usr/local/opt/opencv@3" "/usr/local" NO_DEFAULT_PATH)
endif()
endif()
...@@ -691,7 +691,7 @@ endif() ...@@ -691,7 +691,7 @@ endif()
# ---------------------------------------------------------------------------- # ----------------------------------------------------------------------------
# Calibration && AutoCrop && CameraAmbisonics # Calibration && AutoCrop && CameraAmbisonics
# ---------------------------------------------------------------------------- # ----------------------------------------------------------------------------
find_package(OpenCV) find_package(OpenCV REQUIRED)
add_subdirectory(src/calibration) add_subdirectory(src/calibration)
add_subdirectory(src/autocrop) add_subdirectory(src/autocrop)
......
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