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")