From bdaa6a191005498f429142e3ddac039e589b3c83 Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Wed, 6 Oct 2021 19:09:22 +0000 Subject: [PATCH] highgui: repair Qt backend --- modules/highgui/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/highgui/CMakeLists.txt b/modules/highgui/CMakeLists.txt index 3ef1535d2d..c5541241a4 100644 --- a/modules/highgui/CMakeLists.txt +++ b/modules/highgui/CMakeLists.txt @@ -51,6 +51,8 @@ set(OPENCV_HIGHGUI_BUILTIN_BACKEND "") if(HAVE_QT) set(OPENCV_HIGHGUI_BUILTIN_BACKEND "QT${QT_VERSION_MAJOR}") + add_definitions(-DHAVE_QT) + if(QT_VERSION_MAJOR GREATER 4) # "Automoc" doesn't work properly with opencv_world build, use QT_WRAP_CPP() directly #set(CMAKE_AUTOMOC ON) @@ -75,6 +77,7 @@ if(HAVE_QT) set(qt_deps Core Gui Widgets Test Concurrent) if(HAVE_QT_OPENGL) + add_definitions(-DHAVE_QT_OPENGL) list(APPEND qt_deps OpenGL) endif()