mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 00:07:36 +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
|
@ -0,0 +1,6 @@
|
||||||
|
import("//Meta/Lagom/Tools/lagom_tool.gni")
|
||||||
|
|
||||||
|
lagom_tool("GenerateGLAPIWrapper") {
|
||||||
|
sources = [ "GenerateGLAPIWrapper.cpp" ]
|
||||||
|
deps = [ "//Userland/Libraries/LibMain" ]
|
||||||
|
}
|
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",
|
||||||
|
]
|
||||||
|
}
|
13
Meta/gn/secondary/Userland/Libraries/LibGLSL/BUILD.gn
Normal file
13
Meta/gn/secondary/Userland/Libraries/LibGLSL/BUILD.gn
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
shared_library("LibGLSL") {
|
||||||
|
output_name = "glsl"
|
||||||
|
include_dirs = [ "//Userland/Libraries" ]
|
||||||
|
sources = [
|
||||||
|
"Compiler.cpp",
|
||||||
|
"Linker.cpp",
|
||||||
|
]
|
||||||
|
deps = [
|
||||||
|
"//AK",
|
||||||
|
"//Userland/Libraries/LibCore",
|
||||||
|
"//Userland/Libraries/LibGPU",
|
||||||
|
]
|
||||||
|
}
|
21
Meta/gn/secondary/Userland/Libraries/LibGPU/BUILD.gn
Normal file
21
Meta/gn/secondary/Userland/Libraries/LibGPU/BUILD.gn
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
shared_library("LibGPU") {
|
||||||
|
output_name = "gpu"
|
||||||
|
include_dirs = [ "//Userland/Libraries" ]
|
||||||
|
sources = [
|
||||||
|
"Driver.cpp",
|
||||||
|
"Image.cpp",
|
||||||
|
]
|
||||||
|
deps = [
|
||||||
|
"//AK",
|
||||||
|
"//Userland/Libraries/LibCore",
|
||||||
|
]
|
||||||
|
|
||||||
|
# FIXME: express this dependency properly to avoid cycles
|
||||||
|
# we want to make sure that LibSoftGPU is built when LibGPU is needed
|
||||||
|
#data_deps = [ "//Userland/Libraries/LibSoftGPU" ]
|
||||||
|
if (current_os == "serenity") {
|
||||||
|
#data_deps += [ "//Userland/Libraries/LibVirtGPU" ]
|
||||||
|
} else if (current_os == "linux") {
|
||||||
|
libs = [ "dl" ]
|
||||||
|
}
|
||||||
|
}
|
84
Meta/gn/secondary/Userland/Libraries/LibGfx/BUILD.gn
Normal file
84
Meta/gn/secondary/Userland/Libraries/LibGfx/BUILD.gn
Normal file
|
@ -0,0 +1,84 @@
|
||||||
|
shared_library("LibGfx") {
|
||||||
|
output_name = "gfx"
|
||||||
|
include_dirs = [
|
||||||
|
"//Userland/Libraries",
|
||||||
|
"//Userland",
|
||||||
|
]
|
||||||
|
sources = [
|
||||||
|
"AffineTransform.cpp",
|
||||||
|
"AntiAliasingPainter.cpp",
|
||||||
|
"Bitmap.cpp",
|
||||||
|
"BitmapMixer.cpp",
|
||||||
|
"ClassicStylePainter.cpp",
|
||||||
|
"ClassicWindowTheme.cpp",
|
||||||
|
"Color.cpp",
|
||||||
|
"CursorParams.cpp",
|
||||||
|
"EdgeFlagPathRasterizer.cpp",
|
||||||
|
"Filters/ColorBlindnessFilter.cpp",
|
||||||
|
"Filters/FastBoxBlurFilter.cpp",
|
||||||
|
"Filters/LumaFilter.cpp",
|
||||||
|
"Filters/StackBlurFilter.cpp",
|
||||||
|
"Font/BitmapFont.cpp",
|
||||||
|
"Font/Emoji.cpp",
|
||||||
|
"Font/Font.cpp",
|
||||||
|
"Font/FontDatabase.cpp",
|
||||||
|
"Font/OpenType/Cmap.cpp",
|
||||||
|
"Font/OpenType/Font.cpp",
|
||||||
|
"Font/OpenType/Glyf.cpp",
|
||||||
|
"Font/OpenType/Hinting/Opcodes.cpp",
|
||||||
|
"Font/PathRasterizer.cpp",
|
||||||
|
"Font/ScaledFont.cpp",
|
||||||
|
"Font/Typeface.cpp",
|
||||||
|
"Font/WOFF/Font.cpp",
|
||||||
|
"GradientPainting.cpp",
|
||||||
|
"ICC/BinaryWriter.cpp",
|
||||||
|
"ICC/Profile.cpp",
|
||||||
|
"ICC/TagTypes.cpp",
|
||||||
|
"ICC/Tags.cpp",
|
||||||
|
"ICC/WellKnownProfiles.cpp",
|
||||||
|
"ImageFormats/BMPLoader.cpp",
|
||||||
|
"ImageFormats/BMPWriter.cpp",
|
||||||
|
"ImageFormats/BooleanDecoder.cpp",
|
||||||
|
"ImageFormats/DDSLoader.cpp",
|
||||||
|
"ImageFormats/GIFLoader.cpp",
|
||||||
|
"ImageFormats/ICOLoader.cpp",
|
||||||
|
"ImageFormats/ImageDecoder.cpp",
|
||||||
|
"ImageFormats/JPEGLoader.cpp",
|
||||||
|
"ImageFormats/PBMLoader.cpp",
|
||||||
|
"ImageFormats/PGMLoader.cpp",
|
||||||
|
"ImageFormats/PNGLoader.cpp",
|
||||||
|
"ImageFormats/PNGWriter.cpp",
|
||||||
|
"ImageFormats/PPMLoader.cpp",
|
||||||
|
"ImageFormats/PortableFormatWriter.cpp",
|
||||||
|
"ImageFormats/QOILoader.cpp",
|
||||||
|
"ImageFormats/QOIWriter.cpp",
|
||||||
|
"ImageFormats/TGALoader.cpp",
|
||||||
|
"ImageFormats/TinyVGLoader.cpp",
|
||||||
|
"ImageFormats/WebPLoader.cpp",
|
||||||
|
"ImageFormats/WebPLoaderLossless.cpp",
|
||||||
|
"ImageFormats/WebPLoaderLossy.cpp",
|
||||||
|
"Painter.cpp",
|
||||||
|
"Palette.cpp",
|
||||||
|
"Path.cpp",
|
||||||
|
"Point.cpp",
|
||||||
|
"Rect.cpp",
|
||||||
|
"ShareableBitmap.cpp",
|
||||||
|
"Size.cpp",
|
||||||
|
"StylePainter.cpp",
|
||||||
|
"SystemTheme.cpp",
|
||||||
|
"TextDirection.cpp",
|
||||||
|
"TextLayout.cpp",
|
||||||
|
"Triangle.cpp",
|
||||||
|
"WindowTheme.cpp",
|
||||||
|
]
|
||||||
|
deps = [
|
||||||
|
"//AK",
|
||||||
|
"//Userland/Libraries/LibCompress",
|
||||||
|
"//Userland/Libraries/LibCore",
|
||||||
|
"//Userland/Libraries/LibCrypto",
|
||||||
|
"//Userland/Libraries/LibFileSystem",
|
||||||
|
"//Userland/Libraries/LibIPC",
|
||||||
|
"//Userland/Libraries/LibTextCodec",
|
||||||
|
"//Userland/Libraries/LibUnicode",
|
||||||
|
]
|
||||||
|
}
|
21
Meta/gn/secondary/Userland/Libraries/LibSoftGPU/BUILD.gn
Normal file
21
Meta/gn/secondary/Userland/Libraries/LibSoftGPU/BUILD.gn
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
shared_library("LibSoftGPU") {
|
||||||
|
output_name = "softgpu"
|
||||||
|
include_dirs = [ "//Userland/Libraries" ]
|
||||||
|
cflags_cc = [ "-Wno-psabi" ]
|
||||||
|
sources = [
|
||||||
|
"Clipper.cpp",
|
||||||
|
"Device.cpp",
|
||||||
|
"Image.cpp",
|
||||||
|
"PixelConverter.cpp",
|
||||||
|
"Sampler.cpp",
|
||||||
|
"Shader.cpp",
|
||||||
|
"ShaderCompiler.cpp",
|
||||||
|
"ShaderProcessor.cpp",
|
||||||
|
]
|
||||||
|
deps = [
|
||||||
|
"//AK",
|
||||||
|
"//Userland/Libraries/LibCore",
|
||||||
|
"//Userland/Libraries/LibGPU",
|
||||||
|
"//Userland/Libraries/LibGfx",
|
||||||
|
]
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue