You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Adopt a "submodule-first, FetchContent-fallback" approach for third‑party deps.
- Add and pin submodules under 3rdparty: spdlog, fmt, httplib, skywalking-data-collect-protocol, grpc (pinned tags included).
- Move auto-detection and conflict validation into each dependency module (cmake/*.cmake) and simplify top-level CMakeLists.txt.
- Update CI (main.yml) to checkout submodules and to build gRPC from grpc.
- Add skywalking.cmake and wire proto2cpp to use SKYWALKING_PROTOCOL_PATH.
- Update README.md with submodule workflow, build instructions and bump procedure.
Rationale: improves reproducibility, makes dependency handling explicit and easier to maintain.
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
This repository pins several third-party dependencies under `3rdparty/` (example: `spdlog`, `fmt`, `httplib`, `skywalking-data-collect-protocol`). The top-level CMake will auto-detect these submodules and use them via `add_subdirectory()`.
46
+
47
+
- FetchContent fallback (automatic clone at configure time):
48
+
49
+
If a submodule is not present, CMake can automatically download the dependency at configure time using FetchContent. This is controlled by CMake options of the form `-D<LIB>_FETCHCONTENT=ON` (these are `ON` by default for some deps). For SkyWalking you can enable FetchContent with:
50
+
51
+
```bash
52
+
cmake -DSKYWALKING_FETCHCONTENT=ON -S . -B build
53
+
cmake --build build
43
54
```
44
55
56
+
- Explicit path (developer workflow):
57
+
58
+
If you already have a local checkout of `skywalking-data-collect-protocol`, point CMake to it:
If you are using the recommended submodule-first workflow, this repository includes a pinned copy of gRPC under `3rdparty/grpc` (tag `v1.74.1`). CI is updated to build gRPC from that submodule.
If you prefer not to use the submodule, the previous approach (cloning gRPC separately at a chosen tag and building it) still works, but using the pinned submodule provides reproducible builds and is recommended.
89
+
90
+
How to bump a submodule (example for skywalking-data-collect-protocol):
91
+
```bash
92
+
cd 3rdparty/skywalking-data-collect-protocol
93
+
git fetch --tags
94
+
git checkout tags/v10.4.0 # or a specific commit
95
+
cd ../..
96
+
git add 3rdparty/skywalking-data-collect-protocol
97
+
git commit -m "Pin skywalking-data-collect-protocol to v10.4.0"
98
+
git push
99
+
```
100
+
101
+
If you prefer CI to always fetch the latest submodules, ensure the workflow initializes submodules (this repo's CI uses `actions/checkout` with `submodules: 'recursive'`).
102
+
45
103
You can also use find_package to get target libary in your project. Like this:
0 commit comments