From 6a1334f658f0a6016161f2b05046c07a2be061f1 Mon Sep 17 00:00:00 2001 From: Dup4 Date: Mon, 18 Sep 2023 08:13:47 +0800 Subject: [PATCH] chore: add Integration in README Signed-off-by: Dup4 --- README.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/README.md b/README.md index 86bb589..86c54b9 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,29 @@ Similar to [Jest Snapshot][jest-snapshot], but implemented in C++. * `SNAPSHOT_DIFF(before_content, after_content)` required `git` binary. * Support Linux and macOS. +## Integration + +### CMake + +```cmake +FetchContent_Declare( + snapshot + QUIET + GIT_REPOSITORY https://github.com/Dup4/snapshot-cpp.git + GIT_TAG v{x.y.z} # Where `x.y.z` is the release version you want to use. +) +``` + +### Bazel + +```bazel +git_repository( + name = "snapshot", + remote = "https://github.com/Dup4/snapshot-cpp.git", + tag = "v{x.y.z}", # Where `x.y.z` is the release version you want to use. +) +``` + ## Usage