Skip to content

Commit e065827

Browse files
phaedonFædon Jóhannes Sinis
andauthored
Add build documentation for Bazel users (#216)
Co-authored-by: Fædon Jóhannes Sinis <[email protected]>
1 parent 52a533b commit e065827

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

docs/docs/build/building.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,31 @@ When using Visual Studio on Windows, CMake can be used (either via the terminal
3030
## Compile flags & options
3131

3232
The library includes a few optional safety checks which are performed at runtime, even in release mode. Such checks are generally very cheap yet quite useful. Nonetheless, adding the `NGC_SAFETY_CHECKS` define will disable all optional safety checks, for a very small increase in performance.
33+
34+
## Bazel
35+
36+
geometry-central is now available as a Bazel module: https://registry.bazel.build/modules/geometry-central
37+
38+
To use it, simply add this line to your MODULE.bazel:
39+
40+
`bazel_dep(name = "geometry-central", version = "1.0.0")`
41+
42+
and then specify the dependencies in your build rules. There are four public targets, which correspond to the groupings in the source code:
43+
- `@geometry-central//:numerical`
44+
- `@geometry-central//:surface`
45+
- `@geometry-central//:pointcloud`
46+
- `@geometry-central//:utilities`
47+
48+
For example:
49+
50+
```python
51+
cc_binary(
52+
name = "main",
53+
srcs = ["main.cpp"],
54+
data = ["fox.ply"],
55+
deps = [
56+
"@geometry-central//:surface",
57+
"@geometry-central//:utilities",
58+
],
59+
)
60+
```

0 commit comments

Comments
 (0)