From a7a24fed6882a7c436e488c78e9b7383753f6f56 Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Wed, 18 Sep 2024 10:56:08 -0700 Subject: [PATCH] Meta: Add an option for building against AppKit The build assumed QT or AppKit are the only build UI frameworks. This extends the default assumption away from that to start experimenting with building on other platforms. --- Meta/gn/secondary/Ladybird/BUILD.gn | 3 ++- Meta/gn/secondary/Ladybird/enable_appkit.gni | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 Meta/gn/secondary/Ladybird/enable_appkit.gni diff --git a/Meta/gn/secondary/Ladybird/BUILD.gn b/Meta/gn/secondary/Ladybird/BUILD.gn index bdf955051c9..49336f63e8e 100644 --- a/Meta/gn/secondary/Ladybird/BUILD.gn +++ b/Meta/gn/secondary/Ladybird/BUILD.gn @@ -1,4 +1,5 @@ import("//Ladybird/compile_qt_resource_file.gni") +import("//Ladybird/enable_appkit.gni") import("//Ladybird/enable_qt.gni") import("//Ladybird/link_qt.gni") import("//Ladybird/moc_qt_objects.gni") @@ -110,7 +111,7 @@ executable("ladybird_executable") { ":compile_resource_file", ":generate_moc", ] - } else { + } else if (enable_appkit) { sources += [ "AppKit/Application/Application.mm", "AppKit/Application/ApplicationBridge.cpp", diff --git a/Meta/gn/secondary/Ladybird/enable_appkit.gni b/Meta/gn/secondary/Ladybird/enable_appkit.gni new file mode 100644 index 00000000000..43ea2986339 --- /dev/null +++ b/Meta/gn/secondary/Ladybird/enable_appkit.gni @@ -0,0 +1,4 @@ +declare_args() { + # Build the Ladybird application using the AppKit chrome. + enable_appkit = current_os == "mac" +}