Files
MapLibreParticleLab/platform/linux/BUILD.bazel
2025-07-21 16:41:54 +02:00

58 lines
1.3 KiB
Python

load("@rules_cc//cc:defs.bzl", "cc_library")
load("//bazel:flags.bzl", "CPP_FLAGS", "MAPLIBRE_FLAGS")
ICU_FLAGS = [
"-licuuc ",
"-licui18n",
"-licudata",
]
cc_library(
name = "impl",
srcs = [
"src/gl_functions.cpp",
"src/headless_backend_glx.cpp",
],
copts = CPP_FLAGS + MAPLIBRE_FLAGS,
linkopts = [
"-lGL",
"-lX11",
"-luv",
"-lz",
"-lcurl",
"-lpng",
"-ljpeg",
"-lwebp",
] + ICU_FLAGS,
visibility = ["//visibility:public"],
deps = [
"//:mbgl-core",
"//platform/default:mbgl-default",
],
)
cc_static_library(
name = "maplibre-linux-static",
visibility = ["//visibility:public"],
deps = [
":impl",
],
)
genrule(
name = "maplibre-linux-amalgam",
srcs = [":maplibre-linux-static"],
outs = ["libmaplibre-linux-amalgam.a"],
cmd_bash = """(
armerge --keep-symbols "^.+" --output $(OUTS) $(BINDIR)/platform/linux/libmaplibre-linux-static.a \
$$(pkg-config --variable=libdir icu-uc)/libicuuc.a \
$$(pkg-config --variable=libdir icu-uc)/libicudata.a \
$$(pkg-config --variable=libdir icu-i18n)/libicui18n.a
)"""
)
sh_binary(
name = "startxwrapper",
srcs = ["xorg/startxwrapper"],
)