mirror of
https://codeberg.org/DawnMagnet/reflect-cpp
synced 2026-12-03 16:56:17 +08:00
Reference to the reflect-cpp Conan package (#281)
This commit is contained in:
@@ -6,6 +6,8 @@
|
|||||||
[](https://shields.io/)
|
[](https://shields.io/)
|
||||||
[](https://shields.io/)
|
[](https://shields.io/)
|
||||||
[](https://shields.io/)
|
[](https://shields.io/)
|
||||||
|
[](https://conan.io/center/recipes/reflect-cpp)
|
||||||
|
|
||||||
|
|
||||||
**📖 Documentation**: https://rfl.getml.com — **👨💻 Source Code**: https://github.com/getml/reflect-cpp
|
**📖 Documentation**: https://rfl.getml.com — **👨💻 Source Code**: https://github.com/getml/reflect-cpp
|
||||||
|
|
||||||
@@ -541,9 +543,13 @@ The following compilers are supported:
|
|||||||
- Clang 14.0 or higher
|
- Clang 14.0 or higher
|
||||||
- MSVC 17.8 (19.38) or higher
|
- MSVC 17.8 (19.38) or higher
|
||||||
|
|
||||||
|
### Using Conan
|
||||||
|
|
||||||
|
https://conan.io/center/recipes/reflect-cpp
|
||||||
|
|
||||||
### Compilation using cmake
|
### Compilation using cmake
|
||||||
|
|
||||||
This will simply compile YYJSON, which is the JSON library underlying reflect-cpp. You can then include reflect-cpp in your project and link to the binary to get reflect-cpp with JSON support.
|
This will compile reflect-cpp with JSON support only. You can then include reflect-cpp in your project and link to the binary.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
|
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
|
||||||
@@ -555,7 +561,6 @@ If you need support for any other supported [serialization formats](#serializati
|
|||||||
|
|
||||||
You can also [include the source files](https://rfl.getml.com/install/#option-1-include-source-files-into-your-own-build) into your build or compile it using [cmake and vcpkg.](https://rfl.getml.com/install/#option-3-compilation-using-cmake-and-vcpkg) For detailed installation instructions, please refer to the [install guide](https://rfl.getml.com/install).
|
You can also [include the source files](https://rfl.getml.com/install/#option-1-include-source-files-into-your-own-build) into your build or compile it using [cmake and vcpkg.](https://rfl.getml.com/install/#option-3-compilation-using-cmake-and-vcpkg) For detailed installation instructions, please refer to the [install guide](https://rfl.getml.com/install).
|
||||||
|
|
||||||
|
|
||||||
## The team behind reflect-cpp
|
## The team behind reflect-cpp
|
||||||
|
|
||||||
reflect-cpp has been developed by [getML (Code17 GmbH)](https://getml.com), a company specializing in software engineering and machine learning for enterprise applications. reflect-cpp is currently maintained by Patrick Urbanke and Manuel Bellersen, with major contributions coming from the community.
|
reflect-cpp has been developed by [getML (Code17 GmbH)](https://getml.com), a company specializing in software engineering and machine learning for enterprise applications. reflect-cpp is currently maintained by Patrick Urbanke and Manuel Bellersen, with major contributions coming from the community.
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ hide:
|
|||||||
[](https://shields.io/)
|
[](https://shields.io/)
|
||||||
[](https://shields.io/)
|
[](https://shields.io/)
|
||||||
[](https://shields.io/)
|
[](https://shields.io/)
|
||||||
|
[](https://conan.io/center/recipes/reflect-cpp)
|
||||||
|
|
||||||
**📖 Documentation**: [https://rfl.getml.com](https://rfl.getml.com) — **👨💻 Source Code**: [https://github.com/getml/reflect-cpp](https://github.com/getml/reflect-cpp)
|
**📖 Documentation**: [https://rfl.getml.com](https://rfl.getml.com) — **👨💻 Source Code**: [https://github.com/getml/reflect-cpp](https://github.com/getml/reflect-cpp)
|
||||||
|
|
||||||
|
|||||||
+11
-8
@@ -12,17 +12,13 @@ The following compilers are supported:
|
|||||||
|
|
||||||
You can include the source files into your build or compile it using cmake and vcpkg.
|
You can include the source files into your build or compile it using cmake and vcpkg.
|
||||||
|
|
||||||
## Option 1: Include source files into your own build
|
## Option 1: Using Conan
|
||||||
|
|
||||||
Simply copy the contents of the folders `include` and `src` into your source repository or add it to your include path and also add `src/reflectcpp.cpp` and `src/reflectcpp_json.cpp` and `src/yyjson.c` to your source files for compilation.
|
Simply use the following [recipe](https://conan.io/center/recipes/reflect-cpp).
|
||||||
If you want to link to your own version of YYJSON, then only add `src/reflectcpp.cpp` and `src/reflectcpp_json.cpp`. If you don't need JSON support, then only add `src/reflectcpp.cpp`.
|
|
||||||
|
|
||||||
If you need support for other serialization formats like flexbuffers or XML, you should also add `src/reflectcpp_<format>.cpp` and include and link the respective libraries, as listed in the section on serialization formats.
|
|
||||||
|
|
||||||
## Option 2: Compilation using cmake
|
## Option 2: Compilation using cmake
|
||||||
|
|
||||||
This will simply compile YYJSON, which is the JSON library underlying reflect-cpp. You can then include reflect-cpp in your project and link to the binary
|
This will compile reflect-cpp with JSON support only. You can then include reflect-cpp in your project and link to the binary.
|
||||||
to get reflect-cpp with JSON support.
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
|
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
|
||||||
@@ -30,7 +26,14 @@ cmake --build build -j 4 # gcc, clang
|
|||||||
cmake --build build --config Release -j 4 # MSVC
|
cmake --build build --config Release -j 4 # MSVC
|
||||||
```
|
```
|
||||||
|
|
||||||
## Option 3: Compilation using cmake and vcpkg
|
## Option 3: Include source files into your own build
|
||||||
|
|
||||||
|
Simply copy the contents of the folders `include` and `src` into your source repository or add it to your include path and also add `src/reflectcpp.cpp` and `src/reflectcpp_json.cpp` and `src/yyjson.c` to your source files for compilation.
|
||||||
|
If you want to link to your own version of YYJSON, then only add `src/reflectcpp.cpp` and `src/reflectcpp_json.cpp`. If you don't need JSON support, then only add `src/reflectcpp.cpp`.
|
||||||
|
|
||||||
|
If you need support for other serialization formats like flexbuffers or XML, you should also add `src/reflectcpp_<format>.cpp` and include and link the respective libraries, as listed in the section on serialization formats.
|
||||||
|
|
||||||
|
## Option 4: Compilation using cmake and vcpkg
|
||||||
|
|
||||||
If you want serialization formats other than JSON, you can either install them manually or use vcpkg.
|
If you want serialization formats other than JSON, you can either install them manually or use vcpkg.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user