mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 06:37:35 +00:00
Meta: Add gn build rules for LibGL and its dependencies
This commit is contained in:
parent
bf02069a89
commit
13a5606cdc
6 changed files with 203 additions and 0 deletions
58
Meta/gn/secondary/Userland/Libraries/LibGL/BUILD.gn
Normal file
58
Meta/gn/secondary/Userland/Libraries/LibGL/BUILD.gn
Normal file
|
@ -0,0 +1,58 @@
|
|||
import("//Meta/gn/build/compiled_action.gni")
|
||||
|
||||
compiled_action("generate_glapi") {
|
||||
tool = "//Meta/Lagom/Tools/CodeGenerators/LibGL:GenerateGLAPIWrapper"
|
||||
inputs = [ "GLAPI.json" ]
|
||||
outputs = [
|
||||
"$target_gen_dir/GL/glapi.h",
|
||||
"$target_gen_dir/GLAPI.cpp",
|
||||
]
|
||||
args = [
|
||||
"-h",
|
||||
rebase_path(outputs[0], root_build_dir),
|
||||
"-c",
|
||||
rebase_path(outputs[1], root_build_dir),
|
||||
"-j",
|
||||
rebase_path(inputs[0], root_build_dir),
|
||||
]
|
||||
|
||||
# FIXME: install header into $prefix/include/LibGL/GL on serenity
|
||||
}
|
||||
|
||||
config("gl_headers") {
|
||||
include_dirs = [ "$target_gen_dir/.." ]
|
||||
}
|
||||
|
||||
shared_library("LibGL") {
|
||||
output_name = "gl"
|
||||
include_dirs = [ "//Userland/Libraries" ]
|
||||
public_configs = [ ":gl_headers" ]
|
||||
sources = [
|
||||
"Buffer.cpp",
|
||||
"Buffer/Buffer.cpp",
|
||||
"ClipPlane.cpp",
|
||||
"ContextParameter.cpp",
|
||||
"GLContext.cpp",
|
||||
"Image.cpp",
|
||||
"Lighting.cpp",
|
||||
"List.cpp",
|
||||
"Matrix.cpp",
|
||||
"NameAllocator.cpp",
|
||||
"Shader.cpp",
|
||||
"Shaders/Program.cpp",
|
||||
"Shaders/Shader.cpp",
|
||||
"Stencil.cpp",
|
||||
"Tex/Texture2D.cpp",
|
||||
"Texture.cpp",
|
||||
"Vertex.cpp",
|
||||
]
|
||||
sources += get_target_outputs(":generate_glapi")
|
||||
deps = [
|
||||
":generate_glapi",
|
||||
"//AK",
|
||||
"//Userland/Libraries/LibCore",
|
||||
"//Userland/Libraries/LibGLSL",
|
||||
"//Userland/Libraries/LibGPU",
|
||||
"//Userland/Libraries/LibGfx",
|
||||
]
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue