diff --git a/cmake/templates/OpenCVConfig.cmake.in b/cmake/templates/OpenCVConfig.cmake.in index e5904aba3756..b260fa71130f 100644 --- a/cmake/templates/OpenCVConfig.cmake.in +++ b/cmake/templates/OpenCVConfig.cmake.in @@ -389,3 +389,17 @@ macro(ocv_list_filterout lst regex) endif() endforeach() endmacro() + +include(CMakeFindDependencyMacro) + +if("@ZLIB_FOUND@") + find_dependency(ZLIB CONFIG) +endif() + +if("@TIFF_FOUND@") + find_dependency(TIFF CONFIG) +endif() + +if("@PNG_FOUND@") + find_dependency(PNG CONFIG) +endif()