Bazil, copied from #1275

Christopher Dunn 2021-05-05 21:02:04 -05:00
parent 047bf51bf8
commit 6fc6822f64

@ -116,4 +116,31 @@ If you need, you can customize the jsoncpp recipe. Just clone/fork [it from gith
See [integrations instructions](http://docs.conan.io/en/latest/integrations.html) for how to use your build system with conan.
### 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 .
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.