mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 07:54:58 +00:00
Meta: Support (and default to) Ladybird's AppKit chrome in the GN build
The Qt chrome may be used by setting `enable_qt = true` in args.gn.
This commit is contained in:
parent
e2f9011a8d
commit
665a95e39e
1 changed files with 70 additions and 23 deletions
|
@ -2,6 +2,11 @@ import("//Ladybird/compile_qt_resource_file.gni")
|
||||||
import("//Ladybird/link_qt.gni")
|
import("//Ladybird/link_qt.gni")
|
||||||
import("//Ladybird/moc_qt_objects.gni")
|
import("//Ladybird/moc_qt_objects.gni")
|
||||||
|
|
||||||
|
declare_args() {
|
||||||
|
# Build the Ladybird application using the Qt chrome.
|
||||||
|
enable_qt = current_os != "mac"
|
||||||
|
}
|
||||||
|
|
||||||
group("Ladybird") {
|
group("Ladybird") {
|
||||||
if (current_os == "mac") {
|
if (current_os == "mac") {
|
||||||
deps = [ ":Ladybird.app" ]
|
deps = [ ":Ladybird.app" ]
|
||||||
|
@ -47,10 +52,7 @@ config("ladybird_config") {
|
||||||
}
|
}
|
||||||
|
|
||||||
executable("ladybird_executable") {
|
executable("ladybird_executable") {
|
||||||
configs += [
|
configs += [ ":ladybird_config" ]
|
||||||
":ladybird_config",
|
|
||||||
":ladybird_qt_components",
|
|
||||||
]
|
|
||||||
data_deps = [
|
data_deps = [
|
||||||
":headless-browser",
|
":headless-browser",
|
||||||
"ImageDecoder",
|
"ImageDecoder",
|
||||||
|
@ -61,8 +63,6 @@ executable("ladybird_executable") {
|
||||||
"WebSocket",
|
"WebSocket",
|
||||||
]
|
]
|
||||||
deps = [
|
deps = [
|
||||||
":compile_resource_file",
|
|
||||||
":generate_moc",
|
|
||||||
"//AK",
|
"//AK",
|
||||||
"//Userland/Libraries/LibCore",
|
"//Userland/Libraries/LibCore",
|
||||||
"//Userland/Libraries/LibFileSystem",
|
"//Userland/Libraries/LibFileSystem",
|
||||||
|
@ -79,6 +79,13 @@ executable("ladybird_executable") {
|
||||||
]
|
]
|
||||||
sources = [
|
sources = [
|
||||||
"HelperProcess.cpp",
|
"HelperProcess.cpp",
|
||||||
|
"Utilities.cpp",
|
||||||
|
]
|
||||||
|
|
||||||
|
if (enable_qt) {
|
||||||
|
configs += [ ":ladybird_qt_components" ]
|
||||||
|
|
||||||
|
sources += [
|
||||||
"Qt/AutoComplete.cpp",
|
"Qt/AutoComplete.cpp",
|
||||||
"Qt/BrowserWindow.cpp",
|
"Qt/BrowserWindow.cpp",
|
||||||
"Qt/ConsoleWidget.cpp",
|
"Qt/ConsoleWidget.cpp",
|
||||||
|
@ -94,10 +101,50 @@ executable("ladybird_executable") {
|
||||||
"Qt/Tab.cpp",
|
"Qt/Tab.cpp",
|
||||||
"Qt/WebContentView.cpp",
|
"Qt/WebContentView.cpp",
|
||||||
"Qt/main.cpp",
|
"Qt/main.cpp",
|
||||||
"Utilities.cpp",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
sources += get_target_outputs(":generate_moc") +
|
sources += get_target_outputs(":generate_moc") +
|
||||||
get_target_outputs(":compile_resource_file")
|
get_target_outputs(":compile_resource_file")
|
||||||
|
|
||||||
|
deps += [
|
||||||
|
":compile_resource_file",
|
||||||
|
":generate_moc",
|
||||||
|
]
|
||||||
|
} else {
|
||||||
|
sources += [
|
||||||
|
"AppKit/Application/Application.mm",
|
||||||
|
"AppKit/Application/ApplicationDelegate.mm",
|
||||||
|
"AppKit/Application/EventLoopImplementation.mm",
|
||||||
|
"AppKit/UI/Console.mm",
|
||||||
|
"AppKit/UI/ConsoleController.mm",
|
||||||
|
"AppKit/UI/Event.mm",
|
||||||
|
"AppKit/UI/Inspector.mm",
|
||||||
|
"AppKit/UI/InspectorController.mm",
|
||||||
|
"AppKit/UI/LadybirdWebView.mm",
|
||||||
|
"AppKit/UI/LadybirdWebViewBridge.cpp",
|
||||||
|
"AppKit/UI/Palette.mm",
|
||||||
|
"AppKit/UI/Tab.mm",
|
||||||
|
"AppKit/UI/TabController.mm",
|
||||||
|
"AppKit/Utilities/Conversions.mm",
|
||||||
|
"AppKit/Utilities/NSString+Ladybird.mm",
|
||||||
|
"AppKit/main.mm",
|
||||||
|
]
|
||||||
|
|
||||||
|
deps += [ "//Userland/Libraries/LibUnicode" ]
|
||||||
|
|
||||||
|
cflags_objcc = [
|
||||||
|
"-fobjc-arc",
|
||||||
|
"-Wno-deprecated-anon-enum-enum-conversion", # Required for CGImageCreate
|
||||||
|
]
|
||||||
|
|
||||||
|
include_dirs = [
|
||||||
|
"AppKit",
|
||||||
|
"//Userland",
|
||||||
|
]
|
||||||
|
|
||||||
|
frameworks = [ "Cocoa.framework" ]
|
||||||
|
}
|
||||||
|
|
||||||
output_name = "Ladybird"
|
output_name = "Ladybird"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue