mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 11:57:35 +00:00
Meta/gn: Build WebContent Qt bits only if enable_qt is set
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).
This commit is contained in:
parent
9621e77a31
commit
40138a4a3b
1 changed files with 20 additions and 15 deletions
|
@ -1,3 +1,4 @@
|
||||||
|
import("//Ladybird/enable_qt.gni")
|
||||||
import("//Ladybird/link_qt.gni")
|
import("//Ladybird/link_qt.gni")
|
||||||
import("//Ladybird/moc_qt_objects.gni")
|
import("//Ladybird/moc_qt_objects.gni")
|
||||||
import("//Meta/gn/build/libs/pulse/enable.gni")
|
import("//Meta/gn/build/libs/pulse/enable.gni")
|
||||||
|
@ -20,16 +21,12 @@ link_qt("WebContent_qt") {
|
||||||
}
|
}
|
||||||
|
|
||||||
executable("WebContent") {
|
executable("WebContent") {
|
||||||
configs += [
|
configs += [ "//Ladybird:ladybird_config" ]
|
||||||
"//Ladybird:ladybird_config",
|
|
||||||
":WebContent_qt",
|
|
||||||
]
|
|
||||||
include_dirs = [
|
include_dirs = [
|
||||||
"//Userland/Services",
|
"//Userland/Services",
|
||||||
"//Ladybird",
|
"//Ladybird",
|
||||||
]
|
]
|
||||||
deps = [
|
deps = [
|
||||||
":generate_moc",
|
|
||||||
"//AK",
|
"//AK",
|
||||||
"//Meta/gn/build/libs/pulse",
|
"//Meta/gn/build/libs/pulse",
|
||||||
"//Userland/Libraries/LibCore",
|
"//Userland/Libraries/LibCore",
|
||||||
|
@ -52,15 +49,6 @@ executable("WebContent") {
|
||||||
"//Ladybird/FontPlugin.cpp",
|
"//Ladybird/FontPlugin.cpp",
|
||||||
"//Ladybird/HelperProcess.cpp",
|
"//Ladybird/HelperProcess.cpp",
|
||||||
"//Ladybird/ImageCodecPlugin.cpp",
|
"//Ladybird/ImageCodecPlugin.cpp",
|
||||||
"//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",
|
|
||||||
"//Ladybird/Utilities.cpp",
|
"//Ladybird/Utilities.cpp",
|
||||||
"//Userland/Services/WebContent/ConnectionFromClient.cpp",
|
"//Userland/Services/WebContent/ConnectionFromClient.cpp",
|
||||||
"//Userland/Services/WebContent/ConsoleGlobalEnvironmentExtensions.cpp",
|
"//Userland/Services/WebContent/ConsoleGlobalEnvironmentExtensions.cpp",
|
||||||
|
@ -70,7 +58,24 @@ executable("WebContent") {
|
||||||
"//Userland/Services/WebContent/WebDriverConnection.cpp",
|
"//Userland/Services/WebContent/WebDriverConnection.cpp",
|
||||||
"main.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")
|
sources += get_target_outputs(":generate_moc")
|
||||||
|
deps += [ ":generate_moc" ]
|
||||||
|
}
|
||||||
|
|
||||||
if (current_os == "linux" || current_os == "mac") {
|
if (current_os == "linux" || current_os == "mac") {
|
||||||
cflags_cc = [ "-DHAS_ACCELERATED_GRAPHICS" ]
|
cflags_cc = [ "-DHAS_ACCELERATED_GRAPHICS" ]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue