diff --git a/README.md b/README.md index da2cd40e..176bc388 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,8 @@ [![Generic badge](https://img.shields.io/badge/gcc-11+-blue.svg)](https://shields.io/) [![Generic badge](https://img.shields.io/badge/clang-14+-blue.svg)](https://shields.io/) [![Generic badge](https://img.shields.io/badge/MSVC-17+-blue.svg)](https://shields.io/) +[![Conan Center](https://img.shields.io/conan/v/reflect-cpp)](https://conan.io/center/recipes/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 - MSVC 17.8 (19.38) or higher +### Using Conan + +https://conan.io/center/recipes/reflect-cpp + ### 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 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). - ## 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. diff --git a/docs/index.md b/docs/index.md index e28e2ae5..258fd149 100644 --- a/docs/index.md +++ b/docs/index.md @@ -16,6 +16,7 @@ hide: [![Generic badge](https://img.shields.io/badge/gcc-11+-blue.svg)](https://shields.io/) [![Generic badge](https://img.shields.io/badge/clang-14+-blue.svg)](https://shields.io/) [![Generic badge](https://img.shields.io/badge/MSVC-17+-blue.svg)](https://shields.io/) +[![Conan Center](https://img.shields.io/conan/v/reflect-cpp)](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) @@ -83,4 +84,4 @@ For comprehensive C++ support beyond the scope of GitHub discussions, we’re he ## License -reflect-cpp is released under the MIT License. \ No newline at end of file +reflect-cpp is released under the MIT License. diff --git a/docs/install.md b/docs/install.md index 5bdda079..d63143fc 100644 --- a/docs/install.md +++ b/docs/install.md @@ -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. -## 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. -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_.cpp` and include and link the respective libraries, as listed in the section on serialization formats. +Simply use the following [recipe](https://conan.io/center/recipes/reflect-cpp). ## 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 -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 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 ``` -## 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_.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. @@ -68,4 +71,4 @@ vcpkg is a great, but very ambitious and complex project (just like C++ is a gre 2. *Environment variable VCPKG_FORCE_SYSTEM_BINARIES must be set on arm, s390x, ppc64le and riscv platforms.* - This usually happens on arm platforms like the Apple Silicon chips and can be resolved by simply preceding your build with `export VCPKG_FORCE_SYSTEM_BINARIES=arm` or `export VCPKG_FORCE_SYSTEM_BINARIES=1`. -3. On some occasions you might be asked to specify a compiler. You can do so by simply adding it to the cmake command as follows: `cmake -S . -B build ... -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++` or `cmake -S . -B build ... -DCMAKE_C_COMPILER=clang-17 -DCMAKE_CXX_COMPILER=clang++-17` (or whatever supported compiler you would like to use). \ No newline at end of file +3. On some occasions you might be asked to specify a compiler. You can do so by simply adding it to the cmake command as follows: `cmake -S . -B build ... -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++` or `cmake -S . -B build ... -DCMAKE_C_COMPILER=clang-17 -DCMAKE_CXX_COMPILER=clang++-17` (or whatever supported compiler you would like to use).