Skip to content

Commit

Permalink
Merge pull request #1352 from alicevision/cmake/fix/optionalOpenCV
Browse files Browse the repository at this point in the history
[cmake] cannot have opencv contrib without opencv
  • Loading branch information
fabiencastan authored Feb 14, 2023
2 parents d2ddcfa + a8bea24 commit 87e72bc
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -495,17 +495,17 @@ if(ALICEVISION_BUILD_SFM)
endif()
endif()

if(NOT ALICEVISION_USE_OPENCV_CONTRIB STREQUAL "OFF")
find_package(OpenCV COMPONENTS mcc)
if(OpenCV_FOUND)
set(ALICEVISION_HAVE_OPENCV_CONTRIB 1)
message(STATUS "OpenCV contrib found.")
elseif(ALICEVISION_USE_OPENCV_CONTRIB STREQUAL "ON")
message(SEND_ERROR "Failed to find OpenCV.")
if(ALICEVISION_HAVE_OPENCV)
if(NOT ALICEVISION_USE_OPENCV_CONTRIB STREQUAL "OFF")
find_package(OpenCV COMPONENTS mcc)
if(OpenCV_FOUND)
set(ALICEVISION_HAVE_OPENCV_CONTRIB 1)
message(STATUS "OpenCV contrib found.")
elseif(ALICEVISION_USE_OPENCV_CONTRIB STREQUAL "ON")
message(SEND_ERROR "Failed to find OpenCV.")
endif()
endif()
endif()

if(ALICEVISION_HAVE_OPENCV)
include_directories(${OpenCV_INCLUDE_DIRS})
# add a definition that allows the conditional compiling
if(ALICEVISION_USE_OCVSIFT)
Expand Down

0 comments on commit 87e72bc

Please sign in to comment.