I’m trying to build OpenCV-4.7.0 now, but failed with the following ERROR messages, which seem to tell: BUILD_opencv_world is now ON by default. Actually, I remember I always tried to turn it OFF half a year ago while building opencv from source …
Anyway, the ERRORs are as in the pastebin. And I searched ALL occurrences of BUILD_opencv_world:
➜ opencv-4.7.0 grep -rwn "BUILD_opencv_world"
build/CMakeCache.txt:2339:BUILD_opencv_world:INTERNAL=ON
build/CMakeVars.txt:118:BUILD_opencv_world=ON
CMakeLists.txt:605:if((INSTALL_CREATE_DISTRIB AND BUILD_SHARED_LIBS AND NOT DEFINED BUILD_opencv_world) OR APPLE_FRAMEWORK)
CMakeLists.txt:606: set(BUILD_opencv_world ON CACHE INTERNAL "")
modules/stitching/CMakeLists.txt:8:if(BUILD_SHARED_LIBS AND BUILD_opencv_world AND OPENCV_WORLD_EXCLUDE_EXTRA_MODULES)
modules/imgcodecs/CMakeLists.txt:177:if(NOT BUILD_opencv_world)
modules/python/CMakeLists.txt:10:elseif(BUILD_opencv_world OR (WIN32 AND CMAKE_BUILD_TYPE STREQUAL "Debug"))
modules/highgui/CMakeLists.txt:314:if(NOT BUILD_opencv_world)
modules/java/CMakeLists.txt:8: OR BUILD_opencv_world
doc/tutorials/introduction/windows_install/windows_install.markdown:325: - *BUILD_opencv_world* -\> Generate a single "opencv_world" binary (a shared or static library, depending on *BUILD_SHARED_LIBS*) including all the modules instead of a collection of separate binaries, one binary per module.
cmake/OpenCVUtils.cmake:260: if(BUILD_opencv_world)
cmake/OpenCVUtils.cmake:1436: if(BUILD_opencv_world AND OPENCV_MODULE_${the_module}_IS_PART_OF_WORLD)
cmake/OpenCVUtils.cmake:1500: if(BUILD_opencv_world)
cmake/OpenCVModule.cmake:213: if(NOT OPENCV_MODULE_${the_module}_IS_PART_OF_WORLD OR NOT ${BUILD_opencv_world})
cmake/OpenCVModule.cmake:311: if(BUILD_opencv_world AND m STREQUAL "opencv_world"
cmake/OpenCVModule.cmake:312: OR NOT BUILD_opencv_world
cmake/OpenCVModule.cmake:489: if(BUILD_opencv_world)
cmake/OpenCVModule.cmake:585: if(BUILD_opencv_world
cmake/OpenCVModule.cmake:637: if(BUILD_opencv_world)
cmake/OpenCVModule.cmake:878: if(BUILD_opencv_world AND OPENCV_MODULE_${the_module}_IS_PART_OF_WORLD)
cmake/OpenCVModule.cmake:1204: if(NOT BUILD_opencv_world)
cmake/OpenCVModule.cmake:1247: if(NOT BUILD_opencv_world)
cmake/OpenCVModule.cmake:1299: if(NOT BUILD_opencv_world)
cmake/OpenCVModule.cmake:1344: if(NOT BUILD_opencv_world)
platforms/winpack_dldt/build_package.py:356: BUILD_opencv_world='OFF',
➜ opencv-4.7.0
Not for me, I just pulled from the tip of 4.x without setting
-DBUILD_opencv_world=ON
with the following configuration output
– Disabled: world
What are your arguments to CMake and your configuration output? Have you tried cleaning the build directory and starting from scratch?
On a seperate but related note, I have never had any issues building the world module with CUDA if that is why you want to disable it? I think there used to be some issues but they must have been resolved for a long time.