mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-07 21:59:54 +00:00
CMake: Remove unconditional Qt linkage from WebContent and WebWorker
WebContent only needs it when using QtMultimedia for audio playback, and WebWorker never needs it.
This commit is contained in:
parent
a9f7579738
commit
62c5f4b822
Notes:
github-actions[bot]
2025-07-07 21:54:10 +00:00
Author: https://github.com/ADKaster
Commit: 62c5f4b822
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5331
6 changed files with 33 additions and 58 deletions
|
|
@ -32,22 +32,19 @@ target_include_directories(webcontentservice PUBLIC $<BUILD_INTERFACE:${LADYBIRD
|
|||
target_link_libraries(webcontentservice PUBLIC LibCore LibCrypto LibFileSystem LibGfx LibIPC LibJS LibMain LibMedia LibWeb LibWebSocket LibRequests LibWebView LibImageDecoderClient LibGC)
|
||||
target_link_libraries(webcontentservice PRIVATE OpenSSL::Crypto OpenSSL::SSL)
|
||||
|
||||
if (ENABLE_QT)
|
||||
if (ENABLE_QT AND NOT DEFINED LADYBIRD_AUDIO_BACKEND)
|
||||
find_package(Qt6 REQUIRED COMPONENTS Multimedia)
|
||||
|
||||
qt_add_executable(WebContent main.cpp)
|
||||
target_link_libraries(WebContent PRIVATE Qt::Core)
|
||||
target_compile_definitions(WebContent PRIVATE HAVE_QT=1)
|
||||
|
||||
if (NOT DEFINED LADYBIRD_AUDIO_BACKEND)
|
||||
find_package(Qt6 REQUIRED COMPONENTS Multimedia)
|
||||
|
||||
target_sources(WebContent PRIVATE
|
||||
${LADYBIRD_SOURCE_DIR}/UI/Qt/AudioCodecPluginQt.cpp
|
||||
${LADYBIRD_SOURCE_DIR}/UI/Qt/AudioThread.cpp
|
||||
)
|
||||
|
||||
target_link_libraries(WebContent PRIVATE Qt::Multimedia)
|
||||
target_compile_definitions(WebContent PRIVATE HAVE_QT_MULTIMEDIA=1)
|
||||
endif()
|
||||
target_sources(WebContent PRIVATE
|
||||
${LADYBIRD_SOURCE_DIR}/UI/Qt/AudioCodecPluginQt.cpp
|
||||
${LADYBIRD_SOURCE_DIR}/UI/Qt/AudioThread.cpp
|
||||
)
|
||||
target_link_libraries(WebContent PRIVATE LibWebViewPlatform Qt::Multimedia)
|
||||
target_compile_definitions(WebContent PRIVATE HAVE_QT_MULTIMEDIA=1)
|
||||
else()
|
||||
add_executable(WebContent main.cpp)
|
||||
endif()
|
||||
|
|
|
|||
|
|
@ -36,13 +36,10 @@
|
|||
#include <WebContent/PageClient.h>
|
||||
#include <WebContent/WebDriverConnection.h>
|
||||
|
||||
#if defined(HAVE_QT)
|
||||
#if defined(HAVE_QT_MULTIMEDIA)
|
||||
# include <LibWebView/EventLoop/EventLoopImplementationQt.h>
|
||||
# include <QCoreApplication>
|
||||
|
||||
# if defined(HAVE_QT_MULTIMEDIA)
|
||||
# include <UI/Qt/AudioCodecPluginQt.h>
|
||||
# endif
|
||||
# include <UI/Qt/AudioCodecPluginQt.h>
|
||||
#endif
|
||||
|
||||
#if defined(AK_OS_MACOS)
|
||||
|
|
@ -76,7 +73,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
{
|
||||
AK::set_rich_debug_enabled(true);
|
||||
|
||||
#if defined(HAVE_QT)
|
||||
#if defined(HAVE_QT_MULTIMEDIA)
|
||||
QCoreApplication app(arguments.argc, arguments.argv);
|
||||
|
||||
Core::EventLoopManager::install(*new WebView::EventLoopManagerQt);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue