From 91ed6da3b445bf23bd38c40b0778f6f3f2ee47e0 Mon Sep 17 00:00:00 2001 From: Alexander Smorkalov Date: Mon, 14 Sep 2026 10:39:52 +0300 Subject: [PATCH] Properly disable black-listed modules during world build. --- cmake/OpenCVModule.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmake/OpenCVModule.cmake b/cmake/OpenCVModule.cmake index 19117c1d6e..705e2a0361 100644 --- a/cmake/OpenCVModule.cmake +++ b/cmake/OpenCVModule.cmake @@ -437,6 +437,10 @@ function(__ocv_module_turn_off the_module) list(REMOVE_ITEM OPENCV_MODULES_BUILD "${the_module}") list(REMOVE_ITEM OPENCV_MODULES_PUBLIC "${the_module}") set(HAVE_${the_module} OFF CACHE INTERNAL "Module ${the_module} can not be built in current configuration") + set(BUILD_${the_module} OFF CACHE INTERNAL "Module ${the_module} can not be built in current configuration") + if(BUILD_opencv_world) + set(OPENCV_MODULE_${the_module}_IS_PART_OF_WORLD OFF CACHE INTERNAL "Module ${the_module} can not be built in current configuration") + endif() set(OPENCV_MODULES_DISABLED_AUTO "${OPENCV_MODULES_DISABLED_AUTO}" CACHE INTERNAL "") set(OPENCV_MODULES_BUILD "${OPENCV_MODULES_BUILD}" CACHE INTERNAL "")