Skip to content

Commit

Permalink
COMP: Pass Windows specific OpenCV options to ITKBridgeOpenCV
Browse files Browse the repository at this point in the history
Passing OpenCV_STATIC helps when building OpenCV statically and ITK as shared.

Co-authored-by: Jean-Christophe Fillion-Robin <jchris.fillionr@kitware.com>
  • Loading branch information
2 people authored and dzenanz committed Feb 11, 2022
1 parent cb9952d commit be81e62
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Modules/Video/BridgeOpenCV/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,15 @@ set(ITKVideoBridgeOpenCV_LIBRARIES ITKVideoBridgeOpenCV)

# When this module is loaded by an app, load OpenCV too.
set(ITKVideoBridgeOpenCV_EXPORT_CODE_INSTALL "
set(OpenCV_CUDA ${OpenCV_CUDA}) # Windows specific option
set(OpenCV_STATIC ${OpenCV_STATIC}) # Windows specific option
set(OpenCV_DIR \"${OpenCV_DIR}\")
find_package(OpenCV REQUIRED)
")
set(ITKVideoBridgeOpenCV_EXPORT_CODE_BUILD "
if(NOT ITK_BINARY_DIR)
set(OpenCV_CUDA ${OpenCV_CUDA}) # Windows specific option
set(OpenCV_STATIC ${OpenCV_STATIC}) # Windows specific option
set(OpenCV_DIR \"${OpenCV_DIR}\")
find_package(OpenCV REQUIRED)
endif()
Expand Down

0 comments on commit be81e62

Please sign in to comment.