mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2025-08-09 13:06:46 -04:00
Bazil, copied from #1275
parent
047bf51bf8
commit
6fc6822f64
27
Building.md
27
Building.md
@ -117,3 +117,30 @@ See [integrations instructions](http://docs.conan.io/en/latest/integrations.html
|
||||
|
||||
### Building and testing with scons
|
||||
No longer supported. But you might be able to recover it at commit at https://github.com/open-source-parsers/jsoncpp/commit/6d31cec7cf44dd7e14263f0ffbc888abf515d3dc .
|
||||
|
||||
### Building and testing with Bazel
|
||||
To use specific JsonCpp version in your [Bazel](https://bazel.build/) project, edit your `WORKSPACE` file and add a [`http_archive`](https://docs.bazel.build/versions/master/repo/http.html#http_archive) rule:
|
||||
|
||||
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
|
||||
# ...
|
||||
http_archive(
|
||||
name = "jsoncpp",
|
||||
# sha256 = "X.Y.Z.tar.gz SHA256",
|
||||
strip_prefix = "jsoncpp-X.Y.Z",
|
||||
urls = [
|
||||
"https://github.com/open-source-parsers/jsoncpp/archive/X.Y.Z.tar.gz",
|
||||
],
|
||||
)
|
||||
|
||||
Replace `X.Y.Z` with a correct version, and optionally specify archive file's SHA256 hash.
|
||||
To get the code directly from a git repository, add a [`git_repository`](https://docs.bazel.build/versions/master/repo/git.html#git_repository) instead:
|
||||
|
||||
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
|
||||
# ...
|
||||
git_repository(
|
||||
name = "jsoncpp",
|
||||
branch = "master",
|
||||
remote = "https://github.com/open-source-parsers/jsoncpp.git",
|
||||
)
|
||||
|
||||
In either case, add `"@jsoncpp//:jsoncpp"` as a dependency to targets that use JsonCpp.
|
||||
|
Loading…
x
Reference in New Issue
Block a user