-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMODULE.bazel
More file actions
67 lines (57 loc) · 1.97 KB
/
MODULE.bazel
File metadata and controls
67 lines (57 loc) · 1.97 KB
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
module(
name = "motorium",
version = "0.1.0",
)
bazel_dep(name = "rules_cc", version = "0.2.16")
bazel_dep(name = "eigen", version = "3.4.0.bcr.3")
bazel_dep(name = "abseil-cpp", version = "20250814.1", repo_name = "com_google_absl")
bazel_dep(name = "googletest", version = "1.17.0.bcr.2")
bazel_dep(name = "glfw", version = "3.4.0.bcr.1")
bazel_dep(name = "glew", version = "2.2.0")
# Override glew to add required load() statements for Bazel 7+
archive_override(
module_name = "glew",
urls = ["https://github.com/nigels-com/glew/releases/download/glew-2.2.0/glew-2.2.0.zip"],
integrity = "sha256-qQRqkTd0OVoJXtzAsKwtgcOqzKYXh7OYOblB6b4U4NQ=",
strip_prefix = "glew-2.2.0",
build_file_content = """
load("@rules_cc//cc:defs.bzl", "cc_library", "cc_binary")
package(default_visibility = ["//visibility:public"])
cc_library(
name = "glew_static",
srcs = ["src/glew.c"],
hdrs = glob(["include/GL/*.h"]),
defines = ["GLEW_STATIC"],
strip_include_prefix = "include",
)
cc_binary(
name = "glewinfo",
srcs = ["src/glewinfo.c"],
linkopts = select({
"@platforms//os:windows": ["-DEFAULTLIB:opengl32.lib", "-DEFAULTLIB:User32.lib", "-DEFAULTLIB:Gdi32.lib"],
"@platforms//os:macos": ["-Wl,-framework,OpenGL"],
"//conditions:default": ["-lGL", "-lX11"],
}),
deps = [":glew_static"],
)
""",
patches = ["//patches:glew_module.patch"],
patch_strip = 1,
)
non_module_deps = use_extension("//:extensions.bzl", "non_module_deps")
use_repo(non_module_deps, "mujoco")
bazel_dep(name = "magic_enum", version = "0.9.7")
single_version_override(
module_name = "magic_enum",
patches = [
"//patches:magic_enum_module.patch",
"//patches:magic_enum_build.patch",
],
patch_strip = 1,
)
bazel_dep(name = "rules_python", version = "1.7.0")
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
ignore_root_user_error = True,
python_version = "3.10",
)