diff --git a/CMakeLists.txt b/CMakeLists.txt index 36ad7dcf1da..d036acdddcd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -521,6 +521,9 @@ if(WITH_CORE) if(WITH_QTWEBKIT) message(FATAL_ERROR "QtWebEngine support cannot be enabled if Qt WebKit support is enabled") endif() + + find_package(${QT_VERSION_BASE} COMPONENTS WebEngineCore REQUIRED) + add_definitions(-DWITH_QTWEBENGINE) message(STATUS "QtWebEngine support enabled") set(HAVE_WEBENGINE TRUE) # used in qgsconfig.h diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index 478652caa4c..9492e938ef6 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -2453,6 +2453,12 @@ if (WITH_PDAL) ) endif() +if (WITH_QTWEBENGINE) + target_link_libraries(qgis_core + ${QT_VERSION_BASE}::WebEngineCore + ) +endif() + if (FORCE_STATIC_LIBS) target_link_libraries(qgis_core provider_wms_a