File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -85,9 +85,17 @@ function(mitkFunctionGetLibrarySearchPaths search_path intermediate_dir)
8585 endif ()
8686 endif ()
8787
88- if (OpenCV_DIR)
88+ # If OpenCV is built within the MITK superbuild set the binary directory
89+ # according to the lib path provided by OpenCV.
90+ # In the case where an external OpenCV is provided use the binary directory
91+ # of this OpenCV directory
92+ if (MITK_USE_OpenCV)
8993 if (WIN32 )
90- list (APPEND _dir_candidates "${OpenCV_LIB_PATH} /../bin" )
94+ if (EXISTS ${OpenCV_LIB_PATH} )
95+ list (APPEND _dir_candidates "${OpenCV_LIB_PATH} /../bin" ) # OpenCV is built in superbuild
96+ else ()
97+ list (APPEND _dir_candidates "${OpenCV_DIR} /bin" ) # External OpenCV build is used
98+ endif ()
9199 endif ()
92100 endif ()
93101
You can’t perform that action at this time.
0 commit comments