diff --git a/modules/cvv/CMakeLists.txt b/modules/cvv/CMakeLists.txt index 645e7b39443..2c4ce628baf 100644 --- a/modules/cvv/CMakeLists.txt +++ b/modules/cvv/CMakeLists.txt @@ -15,8 +15,14 @@ endif() find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS ${CVV_QT_MODULES}) -set(CMAKE_AUTOMOC ON) -set(CMAKE_INCLUDE_CURRENT_DIR ON) +if(BUILD_opencv_world) + set(CMAKE_AUTOMOC ON PARENT_SCOPE) + set(CMAKE_INCLUDE_CURRENT_DIR ON PARENT_SCOPE) +else() + set(CMAKE_AUTOMOC ON) + set(CMAKE_INCLUDE_CURRENT_DIR ON) +endif() + foreach(module ${CVV_QT_MODULES}) list(APPEND CVV_LIBRARIES ${Qt${QT_VERSION_MAJOR}${module}_LIBRARIES}) endforeach()