mirror of
https://github.com/RGBCube/serenity
synced 2025-07-14 17:57:34 +00:00

With this, it's possible to build Ladybird without having Qt installed. (Previously, the build required `moc` to exist.) In fact, it's possible to build Ladybird without anything off `brew` as long as you have `ninja` and `gn` (both of which don't have any dependencies themselves and are easy to build).
84 lines
2.6 KiB
Text
84 lines
2.6 KiB
Text
import("//Ladybird/enable_qt.gni")
|
|
import("//Ladybird/link_qt.gni")
|
|
import("//Ladybird/moc_qt_objects.gni")
|
|
import("//Meta/gn/build/libs/pulse/enable.gni")
|
|
|
|
moc_qt_objects("generate_moc") {
|
|
sources = [
|
|
"//Ladybird/Qt/AudioCodecPluginQt.h",
|
|
"//Ladybird/Qt/AudioThread.h",
|
|
"//Ladybird/Qt/EventLoopImplementationQtEventTarget.h",
|
|
"//Ladybird/Qt/RequestManagerQt.h",
|
|
]
|
|
}
|
|
|
|
link_qt("WebContent_qt") {
|
|
qt_components = [
|
|
"Core",
|
|
"Network",
|
|
"Multimedia",
|
|
]
|
|
}
|
|
|
|
executable("WebContent") {
|
|
configs += [ "//Ladybird:ladybird_config" ]
|
|
include_dirs = [
|
|
"//Userland/Services",
|
|
"//Ladybird",
|
|
]
|
|
deps = [
|
|
"//AK",
|
|
"//Meta/gn/build/libs/pulse",
|
|
"//Userland/Libraries/LibCore",
|
|
"//Userland/Libraries/LibFileSystem",
|
|
"//Userland/Libraries/LibGfx",
|
|
"//Userland/Libraries/LibIPC",
|
|
"//Userland/Libraries/LibImageDecoderClient",
|
|
"//Userland/Libraries/LibJS",
|
|
"//Userland/Libraries/LibMain",
|
|
"//Userland/Libraries/LibProtocol",
|
|
"//Userland/Libraries/LibWeb",
|
|
"//Userland/Libraries/LibWebSocket",
|
|
"//Userland/Libraries/LibWebView",
|
|
"//Userland/Libraries/LibWebView:WebContentClientEndpoint",
|
|
"//Userland/Libraries/LibWebView:WebContentServerEndpoint",
|
|
"//Userland/Libraries/LibWebView:WebDriverClientEndpoint",
|
|
"//Userland/Libraries/LibWebView:WebDriverServerEndpoint",
|
|
]
|
|
sources = [
|
|
"//Ladybird/FontPlugin.cpp",
|
|
"//Ladybird/HelperProcess.cpp",
|
|
"//Ladybird/ImageCodecPlugin.cpp",
|
|
"//Ladybird/Utilities.cpp",
|
|
"//Userland/Services/WebContent/ConnectionFromClient.cpp",
|
|
"//Userland/Services/WebContent/ConsoleGlobalEnvironmentExtensions.cpp",
|
|
"//Userland/Services/WebContent/PageClient.cpp",
|
|
"//Userland/Services/WebContent/PageHost.cpp",
|
|
"//Userland/Services/WebContent/WebContentConsoleClient.cpp",
|
|
"//Userland/Services/WebContent/WebDriverConnection.cpp",
|
|
"main.cpp",
|
|
]
|
|
|
|
if (enable_qt) {
|
|
configs += [ ":WebContent_qt" ]
|
|
sources += [
|
|
"//Ladybird/Qt/AudioCodecPluginQt.cpp",
|
|
"//Ladybird/Qt/AudioThread.cpp",
|
|
"//Ladybird/Qt/EventLoopImplementationQt.cpp",
|
|
"//Ladybird/Qt/EventLoopImplementationQtEventTarget.cpp",
|
|
"//Ladybird/Qt/RequestManagerQt.cpp",
|
|
"//Ladybird/Qt/StringUtils.cpp",
|
|
"//Ladybird/Qt/WebSocketClientManagerQt.cpp",
|
|
"//Ladybird/Qt/WebSocketImplQt.cpp",
|
|
"//Ladybird/Qt/WebSocketQt.cpp",
|
|
]
|
|
|
|
sources += get_target_outputs(":generate_moc")
|
|
deps += [ ":generate_moc" ]
|
|
}
|
|
|
|
if (current_os == "linux" || current_os == "mac") {
|
|
cflags_cc = [ "-DHAS_ACCELERATED_GRAPHICS" ]
|
|
deps += [ "//Userland/Libraries/LibAccelGfx" ]
|
|
}
|
|
}
|