1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-23 10:05:07 +00:00
serenity/Meta/gn/secondary/Userland/Libraries/LibProtocol/BUILD.gn
Andrew Kaster 7d7c419ce6 Ladybird: Add WebSocket server for use by Lagom networking
Hide its use behind the same flag as RequestServer in WebContent.
2023-08-03 09:55:20 +02:00

72 lines
2.1 KiB
Text

import("//Meta/gn/build/compiled_action.gni")
compiled_action("RequestClientEndpoint") {
tool = "//Meta/Lagom/Tools/CodeGenerators/IPCCompiler"
inputs = [ "//Userland/Services/RequestServer/RequestClient.ipc" ]
outputs = [ "$root_gen_dir/RequestServer/RequestClientEndpoint.h" ]
args = [
rebase_path(inputs[0], root_build_dir),
"-o",
rebase_path(outputs[0], root_build_dir),
]
}
compiled_action("RequestServerEndpoint") {
tool = "//Meta/Lagom/Tools/CodeGenerators/IPCCompiler"
inputs = [ "//Userland/Services/RequestServer/RequestServer.ipc" ]
outputs = [ "$root_gen_dir/RequestServer/RequestServerEndpoint.h" ]
args = [
rebase_path(inputs[0], root_build_dir),
"-o",
rebase_path(outputs[0], root_build_dir),
]
}
compiled_action("WebSocketClientEndpoint") {
tool = "//Meta/Lagom/Tools/CodeGenerators/IPCCompiler"
inputs = [ "//Userland/Services/WebSocket/WebSocketClient.ipc" ]
outputs = [ "$root_gen_dir/WebSocket/WebSocketClientEndpoint.h" ]
args = [
rebase_path(inputs[0], root_build_dir),
"-o",
rebase_path(outputs[0], root_build_dir),
]
}
compiled_action("WebSocketServerEndpoint") {
tool = "//Meta/Lagom/Tools/CodeGenerators/IPCCompiler"
inputs = [ "//Userland/Services/WebSocket/WebSocketServer.ipc" ]
outputs = [ "$root_gen_dir/WebSocket/WebSocketServerEndpoint.h" ]
args = [
rebase_path(inputs[0], root_build_dir),
"-o",
rebase_path(outputs[0], root_build_dir),
]
}
shared_library("LibProtocol") {
output_name = "protocol"
include_dirs = [
"//Userland/Libraries",
"//Userland/Services",
]
deps = [
":RequestClientEndpoint",
":RequestServerEndpoint",
":WebSocketClientEndpoint",
":WebSocketServerEndpoint",
"//AK",
"//Userland/Libraries/LibCore",
"//Userland/Libraries/LibIPC",
]
sources = [
"Request.cpp",
"RequestClient.cpp",
"WebSocket.cpp",
"WebSocketClient.cpp",
]
sources += get_target_outputs(":RequestClientEndpoint") +
get_target_outputs(":RequestServerEndpoint") +
get_target_outputs(":WebSocketClientEndpoint") +
get_target_outputs(":WebSocketServerEndpoint")
}