We don't need WebEngineWidgets on qt6 builds

This commit is contained in:
Nyall Dawson 2023-12-20 10:47:01 +10:00
parent 78c4c12dc4
commit 1e3a5a114d

View File

@ -515,7 +515,12 @@ if(WITH_CORE)
set (WITH_QTWEBENGINE FALSE CACHE BOOL "Enable QtWebEngine support")
if (WITH_QTWEBENGINE)
find_package(${QT_VERSION_BASE} COMPONENTS WebEngineCore WebEngineWidgets REQUIRED)
if(BUILD_WITH_QT6)
find_package(${QT_VERSION_BASE} COMPONENTS WebEngineCore REQUIRED)
else()
# QWebEnginePage is only available in widgets module in Qt5
find_package(${QT_VERSION_BASE} COMPONENTS WebEngineCore WebEngineWidgets REQUIRED)
endif()
add_definitions(-DWITH_QTWEBENGINE)
message(STATUS "QtWebEngine support enabled")