mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-11 21:37:58 +03: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
Notes:
sideshowbarker
2024-07-16 22:51:10 +09:00
Author: https://github.com/trflynn89 Commit: https://github.com/SerenityOS/serenity/commit/665a95e39e Pull-request: https://github.com/SerenityOS/serenity/pull/21937 Reviewed-by: https://github.com/ADKaster ✅
@ -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…
Reference in New Issue
Block a user