-
Notifications
You must be signed in to change notification settings - Fork 1
/
MODULE.bazel
174 lines (138 loc) · 5.3 KB
/
MODULE.bazel
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
###############################################################################
# Bazel now uses Bzlmod by default to manage external dependencies.
# Please consider migrating your external dependencies from WORKSPACE to MODULE.bazel.
#
# For more details, please check https://github.com/bazelbuild/bazel/issues/18958
###############################################################################
"""Donner is a modern C++20 SVG rendering library which intends to provide easily
embeddable SVG support into apps and games, enabling browser-level functionalit
without the browser."""
module(name = "donner")
local_repository = use_repo_rule("//third_party:bazel/local.bzl", "local_repository")
new_local_repository = use_repo_rule("//third_party:bazel/local.bzl", "new_local_repository")
git_repository = use_repo_rule("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
# Build dependencies
bazel_dep(name = "apple_support", version = "1.17.1", repo_name = "build_bazel_apple_support") # Must be before rules_cc
bazel_dep(name = "rules_cc", version = "0.0.13")
bazel_dep(name = "bazel_skylib", version = "1.7.1")
bazel_dep(name = "platforms", version = "0.0.10")
##
## Third-party dependencies
##
# Core dependencies
bazel_dep(name = "abseil-cpp", repo_name = "com_google_absl", version = "20240722.0") # Used for number parsing
# Skia dependencies
bazel_dep(name = "rules_license", version = "1.0.0")
local_repository(
name = "skia_user_config",
path = "third_party/skia_user_config",
)
git_repository(
name = "skia",
commit = "0ec9b089fa9e8a7daa9e4a6c655870cc5d54feb6",
remote = "https://github.com/google/skia",
)
bazel_deps = use_repo_rule("@skia//bazel:deps.bzl", "bazel_deps")
c_plus_plus_deps = use_repo_rule("@skia//bazel:deps.bzl", "c_plus_plus_deps")
header_based_configs = use_repo_rule("@skia//bazel:deps.bzl", "header_based_configs")
git_repository(
name = "entt",
remote = "https://github.com/skypjack/entt",
tag = "v3.13.2",
)
new_local_repository(
name = "frozen",
build_file = "//third_party:BUILD.frozen",
path = "third_party/frozen",
)
##
## Test dependencies
##
bazel_dep(name = "googletest", repo_name = "com_google_gtest", version = "1.15.2", dev_dependency = True)
bazel_dep(name = "nlohmann_json", version = "3.11.3.bcr.1", dev_dependency = True)
bazel_dep(name = "pixelmatch-cpp17", version = "0.0.0", dev_dependency = True)
git_override(
module_name = "pixelmatch-cpp17",
remote = "https://github.com/jwmcglynn/pixelmatch-cpp17",
commit = "01f0030f5b7a1a1d002ba4ac895ea563f212ccd8",
)
bazel_dep(name = "stb", version = "0.0.0")
git_override(
module_name = "stb",
remote = "https://github.com/jwmcglynn/rules_stb",
commit = "075e5a470e31e46a7318cc308c79dba205a6b2eb",
)
# Skia dependencies
bazel_dep(name = "rules_go", version = "0.50.1")
bazel_dep(name = "rules_python", version = "0.38.0", dev_dependency = True)
pip = use_extension(
"@rules_python//python/extensions:pip.bzl",
"pip",
dev_dependency = True,
)
pip.parse(
hub_name = "pip_deps",
python_version = "3.11",
requirements_lock = "//tools/python:requirements.txt",
)
use_repo(pip, "pip_deps")
#
# Toolchain
#
bazel_dep(name = "toolchains_llvm", version = "1.2.0", dev_dependency = True)
# To use a local copy of the toolchains_llvm repository, uncomment the following.
# local_path_override(
# module_name = "toolchains_llvm",
# path = "../toolchains_llvm",
# )
llvm = use_extension("@toolchains_llvm//toolchain/extensions:llvm.bzl", "llvm", dev_dependency = True)
llvm.toolchain(
name = "llvm_toolchain",
llvm_version = "19.1.0", # Note that this doesn't support aarch64 linux, for that use 18.1.8
)
use_repo(llvm, "llvm_toolchain", "llvm_toolchain_llvm")
# NOTE: This to use this toolchain specify --config=latest_llvm
# This is enabled by default on Linux, disabled by default on macOS
# register_toolchains("@llvm_toolchain//:all", dev_dependency = True)
bazel_dep(name = "zstd", version = "1.5.6", dev_dependency = True)
#
# Devtools
#
# Hedron's Compile Commands Extractor for Bazel
# https://github.com/hedronvision/bazel-compile-commands-extractor
bazel_dep(name = "hedron_compile_commands", dev_dependency = True)
git_override(
module_name = "hedron_compile_commands",
remote = "https://github.com/hedronvision/bazel-compile-commands-extractor",
commit = "4f28899228fb3ad0126897876f147ca15026151e",
)
bazel_dep(name = "rules_proto", version = "6.0.2", dev_dependency = True)
bazel_dep(name = "bloaty", version = "0.0.0", dev_dependency = True)
git_override(
module_name = "bloaty",
remote = "https://github.com/jwmcglynn/bloaty",
commit = "a655c418811ef5097e37a562ce62f925bda72d88",
)
#
# SVG Viewer
#
bazel_dep(name = "imgui", version = "0.0.0", dev_dependency = True)
git_override(
module_name = "imgui",
remote = "https://github.com/ocornut/imgui",
commit = "8199457a7d9e453f8d3d9cadc14683fb54a858b5",
patches = [
"//third_party/patches:imgui_bazel_build_files.patch",
],
patch_strip = 1,
)
bazel_dep(name = "glfw", version = "0.0.0", dev_dependency = True)
git_override(
module_name = "glfw",
remote = "https://github.com/glfw/glfw",
commit = "b35641f4a3c62aa86a0b3c983d163bc0fe36026d",
patches = [
"//third_party/patches:glfw_bazel_build_files.patch",
],
patch_strip = 1,
)