From 0bc932eb99fda20f9257b584fa1e005d5593f484 Mon Sep 17 00:00:00 2001 From: Nyall Dawson Date: Fri, 15 Dec 2023 09:43:18 +1000 Subject: [PATCH] If webengine support enabled, link core to webengine --- CMakeLists.txt | 3 +++ src/core/CMakeLists.txt | 6 ++++++ 2 files changed, 9 insertions(+) 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