Add Bazel build file implementation (#419)

This commit is contained in:
Nathan Van Fleet
2022-09-06 20:32:43 -07:00
committed by GitHub
parent aa89bc2f4a
commit 35c86172e4
13 changed files with 979 additions and 0 deletions

46
BUILD.bazel Normal file
View File

@@ -0,0 +1,46 @@
load("//bazel:flags.bzl", "CPP_FLAGS", "MAPLIBRE_FLAGS")
# This is defined by both
# platform/default/filesource-files.json
# and
# src/core-files.json
# because they have dependencies on each other
cc_library(
name = "mbgl-core",
srcs = glob(
[
"src/**/*.cpp",
"src/**/*.hpp",
],
allow_empty = False,
),
hdrs = glob(
[
"include/**/*.hpp",
],
allow_empty = False,
),
copts = CPP_FLAGS + MAPLIBRE_FLAGS,
includes = [
"include",
"src",
],
local_defines = [
r"MBGL_VERSION_REV=\"standalone\"",
],
visibility = ["//visibility:public"],
deps = [
"//vendor:boost",
"//vendor:csscolorparser",
"//vendor:earcut.hpp",
"//vendor:eternal",
"//vendor:icu",
"//vendor:mapbox-base",
"//vendor:parsedate",
"//vendor:polylabel",
"//vendor:protozero",
"//vendor:unique_resource",
"//vendor:vector-tile",
"//vendor:wagyu",
],
)