From 528559334f5dbe4a3ea4dfc69d6d125960f3fc48 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Wed, 24 Nov 2021 16:16:28 -0800 Subject: [PATCH] build-system: allow building with WebEngine but not WebKit This appears to be required on openSUSE Tumbleweed where QtWebKit has disappeared, but QtWebEngine is available. I'm not sure how to deal with the seemingly independent NO_USERMANUAL and NO_PRINTING... this solution adds WebEngine if either of those is set. Signed-off-by: Dirk Hohndel --- CMakeLists.txt | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fc30aba9c..6dbe83493 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -190,9 +190,13 @@ if (SUBSURFACE_TARGET_EXECUTABLE MATCHES "DesktopExecutable") add_definitions(-DNO_PRINTING) else() LIST(APPEND QT_EXTRA_COMPONENTS PrintSupport) - # Because Qt5WebKitWidgets isn't a part of the "regular" Qt5, we can't get it the normal way - find_package(Qt5WebKitWidgets REQUIRED) - set(SUBSURFACE_LINK_LIBRARIES ${SUBSURFACE_LINK_LIBRARIES} Qt5::WebKitWidgets) + if(USE_WEBENGINE) + LIST(APPEND QT_EXTRA_COMPONENTS WebEngine) + else() + # Because Qt5WebKitWidgets isn't a part of the "regular" Qt5, we can't get it the normal way + find_package(Qt5WebKitWidgets REQUIRED) + set(SUBSURFACE_LINK_LIBRARIES ${SUBSURFACE_LINK_LIBRARIES} Qt5::WebKitWidgets) + endif() endif() elseif (SUBSURFACE_TARGET_EXECUTABLE MATCHES "MobileExecutable") if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")