From be81e6223240508642b963511e6441203df6375e Mon Sep 17 00:00:00 2001 From: James Butler Date: Thu, 10 Feb 2022 10:45:40 -0500 Subject: [PATCH] COMP: Pass Windows specific OpenCV options to `ITKBridgeOpenCV` Passing OpenCV_STATIC helps when building OpenCV statically and ITK as shared. Co-authored-by: Jean-Christophe Fillion-Robin --- Modules/Video/BridgeOpenCV/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Modules/Video/BridgeOpenCV/CMakeLists.txt b/Modules/Video/BridgeOpenCV/CMakeLists.txt index 09ae9b4d0b4..9c7fb5cce06 100644 --- a/Modules/Video/BridgeOpenCV/CMakeLists.txt +++ b/Modules/Video/BridgeOpenCV/CMakeLists.txt @@ -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()