mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 12:05:15 +00:00
Meta: Add CodeGenerators and library dependencies for them to gn build
This commit is contained in:
parent
cbda1a6c73
commit
05f56e09b5
Notes:
sideshowbarker
2024-07-18 05:37:06 +09:00
Author: https://github.com/ADKaster Commit: https://github.com/SerenityOS/serenity/commit/05f56e09b5 Pull-request: https://github.com/SerenityOS/serenity/pull/18663 Reviewed-by: https://github.com/BenWiederhake Reviewed-by: https://github.com/BertalanD Reviewed-by: https://github.com/nico
12 changed files with 218 additions and 1 deletions
|
@ -1,7 +1,10 @@
|
|||
import("//Meta/gn/build/toolchain/compiler.gni")
|
||||
|
||||
group("default") {
|
||||
deps = [ "//Tests" ]
|
||||
deps = [
|
||||
"//Meta/Lagom/Tools/CodeGenerators/IPCCompiler",
|
||||
"//Tests",
|
||||
]
|
||||
testonly = true
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
import("//Meta/Lagom/Tools/lagom_tool.gni")
|
||||
|
||||
lagom_tool("IPCCompiler") {
|
||||
sources = [ "main.cpp" ]
|
||||
deps = [ "//Userland/Libraries/LibMain" ]
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
import("//Meta/Lagom/Tools/lagom_tool.gni")
|
||||
|
||||
lagom_tool("GenerateDateTimeFormatData") {
|
||||
sources = [ "GenerateDateTimeFormatData.cpp" ]
|
||||
deps = [
|
||||
"//Userland/Libraries/LibMain",
|
||||
"//Userland/Libraries/LibTimeZone",
|
||||
]
|
||||
}
|
||||
|
||||
lagom_tool("GenerateLocaleData") {
|
||||
sources = [ "GenerateLocaleData.cpp" ]
|
||||
deps = [ "//Userland/Libraries/LibMain" ]
|
||||
}
|
||||
|
||||
lagom_tool("GenerateNumberFormatData") {
|
||||
sources = [ "GenerateNumberFormatData.cpp" ]
|
||||
deps = [ "//Userland/Libraries/LibMain" ]
|
||||
}
|
||||
|
||||
lagom_tool("GeneratePluralRulesData") {
|
||||
sources = [ "GeneratePluralRulesData.cpp" ]
|
||||
deps = [ "//Userland/Libraries/LibMain" ]
|
||||
}
|
||||
|
||||
lagom_tool("GenerateRelativeTimeFormatData") {
|
||||
sources = [ "GenerateRelativeTimeFormatData.cpp" ]
|
||||
deps = [ "//Userland/Libraries/LibMain" ]
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
import("//Meta/Lagom/Tools/lagom_tool.gni")
|
||||
|
||||
lagom_tool("GenerateTimeZoneData") {
|
||||
sources = [ "GenerateTimeZoneData.cpp" ]
|
||||
deps = [ "//Userland/Libraries/LibMain" ]
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
import("//Meta/Lagom/Tools/lagom_tool.gni")
|
||||
|
||||
lagom_tool("GenerateUnicodeData") {
|
||||
sources = [ "GenerateUnicodeData.cpp" ]
|
||||
deps = [ "//Userland/Libraries/LibMain" ]
|
||||
}
|
||||
|
||||
lagom_tool("GenerateEmojiData") {
|
||||
sources = [ "GenerateEmojiData.cpp" ]
|
||||
deps = [ "//Userland/Libraries/LibMain" ]
|
||||
}
|
|
@ -0,0 +1,62 @@
|
|||
import("//Meta/Lagom/Tools/lagom_tool.gni")
|
||||
|
||||
source_set("headers") {
|
||||
sources = [ "GeneratorUtil.h" ]
|
||||
}
|
||||
|
||||
lagom_tool("GenerateAriaRoles") {
|
||||
sources = [ "GenerateAriaRoles.cpp" ]
|
||||
deps = [
|
||||
":headers",
|
||||
"//Userland/Libraries/LibMain",
|
||||
]
|
||||
}
|
||||
|
||||
lagom_tool("GenerateCSSEnums") {
|
||||
sources = [ "GenerateCSSEnums.cpp" ]
|
||||
deps = [
|
||||
":headers",
|
||||
"//Userland/Libraries/LibMain",
|
||||
]
|
||||
}
|
||||
|
||||
lagom_tool("GenerateCSSMediaFeatureID") {
|
||||
sources = [ "GenerateCSSMediaFeatureID.cpp" ]
|
||||
deps = [
|
||||
":headers",
|
||||
"//Userland/Libraries/LibMain",
|
||||
]
|
||||
}
|
||||
|
||||
lagom_tool("GenerateCSSPropertyID") {
|
||||
sources = [ "GenerateCSSPropertyID.cpp" ]
|
||||
deps = [
|
||||
":headers",
|
||||
"//Userland/Libraries/LibMain",
|
||||
]
|
||||
}
|
||||
|
||||
lagom_tool("GenerateCSSTransformFunctions") {
|
||||
sources = [ "GenerateCSSTransformFunctions.cpp" ]
|
||||
deps = [
|
||||
":headers",
|
||||
"//Userland/Libraries/LibMain",
|
||||
]
|
||||
}
|
||||
|
||||
lagom_tool("GenerateCSSValueID") {
|
||||
sources = [ "GenerateCSSValueID.cpp" ]
|
||||
deps = [
|
||||
":headers",
|
||||
"//Userland/Libraries/LibMain",
|
||||
]
|
||||
}
|
||||
|
||||
lagom_tool("GenerateWindowOrWorkerInterfaces") {
|
||||
sources = [ "GenerateWindowOrWorkerInterfaces.cpp" ]
|
||||
deps = [
|
||||
":headers",
|
||||
"//Userland/Libraries/LibIDL",
|
||||
"//Userland/Libraries/LibMain",
|
||||
]
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
import("//Meta/Lagom/Tools/lagom_tool.gni")
|
||||
|
||||
lagom_tool("BindingsGenerator") {
|
||||
sources = [
|
||||
"IDLGenerators.cpp",
|
||||
"Namespaces.h",
|
||||
"main.cpp",
|
||||
]
|
||||
deps = [
|
||||
"//Userland/Libraries/LibIDL",
|
||||
"//Userland/Libraries/LibMain",
|
||||
]
|
||||
}
|
16
Meta/gn/secondary/Meta/Lagom/Tools/lagom_tool.gni
Normal file
16
Meta/gn/secondary/Meta/Lagom/Tools/lagom_tool.gni
Normal file
|
@ -0,0 +1,16 @@
|
|||
template("lagom_tool") {
|
||||
assert(current_toolchain == host_toolchain,
|
||||
"Must only depend on Lagom tools from the host_toolchain")
|
||||
executable(target_name) {
|
||||
forward_variables_from(invoker, "*")
|
||||
include_dirs = [
|
||||
"//",
|
||||
"$root_gen_dir",
|
||||
"//Userland/Libraries",
|
||||
]
|
||||
deps += [
|
||||
"//Userland/Libraries/LibCore",
|
||||
"//Userland/Libraries/LibFileSystem",
|
||||
]
|
||||
}
|
||||
}
|
14
Meta/gn/secondary/Userland/Libraries/LibFileSystem/BUILD.gn
Normal file
14
Meta/gn/secondary/Userland/Libraries/LibFileSystem/BUILD.gn
Normal file
|
@ -0,0 +1,14 @@
|
|||
shared_library("LibFileSystem") {
|
||||
include_dirs = [ "//Userland/Libraries" ]
|
||||
sources = [
|
||||
"FileSystem.cpp",
|
||||
"FileSystem.h",
|
||||
"TempFile.cpp",
|
||||
"TempFile.h",
|
||||
]
|
||||
deps = [
|
||||
"//AK",
|
||||
"//Userland/Libraries/LibCore",
|
||||
]
|
||||
output_name = "filesystem"
|
||||
}
|
26
Meta/gn/secondary/Userland/Libraries/LibIPC/BUILD.gn
Normal file
26
Meta/gn/secondary/Userland/Libraries/LibIPC/BUILD.gn
Normal file
|
@ -0,0 +1,26 @@
|
|||
shared_library("LibIPC") {
|
||||
output_name = "ipc"
|
||||
include_dirs = [ "//Userland/Libraries" ]
|
||||
sources = [
|
||||
"Concepts.h",
|
||||
"Connection.cpp",
|
||||
"Connection.h",
|
||||
"ConnectionFromClient.h",
|
||||
"ConnectionToServer.h",
|
||||
"Decoder.cpp",
|
||||
"Decoder.h",
|
||||
"Dictionary.h",
|
||||
"Encoder.cpp",
|
||||
"Encoder.h",
|
||||
"File.h",
|
||||
"Forward.h",
|
||||
"Message.h",
|
||||
"MultiServer.h",
|
||||
"SingleServer.h",
|
||||
"Stub.h",
|
||||
]
|
||||
deps = [
|
||||
"//AK",
|
||||
"//Userland/Libraries/LibCore",
|
||||
]
|
||||
}
|
9
Meta/gn/secondary/Userland/Libraries/LibMain/BUILD.gn
Normal file
9
Meta/gn/secondary/Userland/Libraries/LibMain/BUILD.gn
Normal file
|
@ -0,0 +1,9 @@
|
|||
static_library("LibMain") {
|
||||
include_dirs = [ "//Userland/Libraries" ]
|
||||
sources = [
|
||||
"Main.cpp",
|
||||
"Main.h",
|
||||
]
|
||||
deps = [ "//AK" ]
|
||||
output_name = "main"
|
||||
}
|
22
Meta/gn/secondary/Userland/Libraries/LibTimeZone/BUILD.gn
Normal file
22
Meta/gn/secondary/Userland/Libraries/LibTimeZone/BUILD.gn
Normal file
|
@ -0,0 +1,22 @@
|
|||
declare_args() {
|
||||
# If true, Download tzdata from data.iana.org and use it in LibTimeZone
|
||||
# Data will be downloaded to $cache_path/TZDB
|
||||
enable_timezone_database_download = false
|
||||
}
|
||||
|
||||
source_set("LibTimeZone") {
|
||||
output_name = "timezone"
|
||||
include_dirs = [ "//Userland/Libraries" ]
|
||||
sources = [
|
||||
"Forward.h",
|
||||
"TimeZone.cpp",
|
||||
"TimeZone.h",
|
||||
]
|
||||
deps = [
|
||||
"//AK",
|
||||
"//Userland/Libraries/LibCore",
|
||||
]
|
||||
if (enable_timezone_database_download) {
|
||||
deps += [ ":timezone_data" ]
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue