mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-21 23:20:20 +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
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 ✅
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/moc_qt_objects.gni")
|
||||
|
||||
declare_args() {
|
||||
# Build the Ladybird application using the Qt chrome.
|
||||
enable_qt = current_os != "mac"
|
||||
}
|
||||
|
||||
group("Ladybird") {
|
||||
if (current_os == "mac") {
|
||||
deps = [ ":Ladybird.app" ]
|
||||
|
@ -47,10 +52,7 @@ config("ladybird_config") {
|
|||
}
|
||||
|
||||
executable("ladybird_executable") {
|
||||
configs += [
|
||||
":ladybird_config",
|
||||
":ladybird_qt_components",
|
||||
]
|
||||
configs += [ ":ladybird_config" ]
|
||||
data_deps = [
|
||||
":headless-browser",
|
||||
"ImageDecoder",
|
||||
|
@ -61,8 +63,6 @@ executable("ladybird_executable") {
|
|||
"WebSocket",
|
||||
]
|
||||
deps = [
|
||||
":compile_resource_file",
|
||||
":generate_moc",
|
||||
"//AK",
|
||||
"//Userland/Libraries/LibCore",
|
||||
"//Userland/Libraries/LibFileSystem",
|
||||
|
@ -79,25 +79,72 @@ executable("ladybird_executable") {
|
|||
]
|
||||
sources = [
|
||||
"HelperProcess.cpp",
|
||||
"Qt/AutoComplete.cpp",
|
||||
"Qt/BrowserWindow.cpp",
|
||||
"Qt/ConsoleWidget.cpp",
|
||||
"Qt/EventLoopImplementationQt.cpp",
|
||||
"Qt/EventLoopImplementationQtEventTarget.cpp",
|
||||
"Qt/Icon.cpp",
|
||||
"Qt/InspectorWidget.cpp",
|
||||
"Qt/LocationEdit.cpp",
|
||||
"Qt/Settings.cpp",
|
||||
"Qt/SettingsDialog.cpp",
|
||||
"Qt/StringUtils.cpp",
|
||||
"Qt/TVGIconEngine.cpp",
|
||||
"Qt/Tab.cpp",
|
||||
"Qt/WebContentView.cpp",
|
||||
"Qt/main.cpp",
|
||||
"Utilities.cpp",
|
||||
]
|
||||
sources += get_target_outputs(":generate_moc") +
|
||||
get_target_outputs(":compile_resource_file")
|
||||
|
||||
if (enable_qt) {
|
||||
configs += [ ":ladybird_qt_components" ]
|
||||
|
||||
sources += [
|
||||
"Qt/AutoComplete.cpp",
|
||||
"Qt/BrowserWindow.cpp",
|
||||
"Qt/ConsoleWidget.cpp",
|
||||
"Qt/EventLoopImplementationQt.cpp",
|
||||
"Qt/EventLoopImplementationQtEventTarget.cpp",
|
||||
"Qt/Icon.cpp",
|
||||
"Qt/InspectorWidget.cpp",
|
||||
"Qt/LocationEdit.cpp",
|
||||
"Qt/Settings.cpp",
|
||||
"Qt/SettingsDialog.cpp",
|
||||
"Qt/StringUtils.cpp",
|
||||
"Qt/TVGIconEngine.cpp",
|
||||
"Qt/Tab.cpp",
|
||||
"Qt/WebContentView.cpp",
|
||||
"Qt/main.cpp",
|
||||
]
|
||||
|
||||
sources += get_target_outputs(":generate_moc") +
|
||||
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"
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue