mirror of
https://codeberg.org/DawnMagnet/reflect-cpp
synced 2026-12-06 10:46:18 +08:00
Deployed 8af0e6e with MkDocs version: 1.6.1
This commit is contained in:
+2
-1
@@ -2412,7 +2412,8 @@
|
||||
<a href="https://shields.io/"><img alt="Generic badge" src="https://img.shields.io/badge/C++-20-blue.svg" /></a>
|
||||
<a href="https://shields.io/"><img alt="Generic badge" src="https://img.shields.io/badge/gcc-11+-blue.svg" /></a>
|
||||
<a href="https://shields.io/"><img alt="Generic badge" src="https://img.shields.io/badge/clang-14+-blue.svg" /></a>
|
||||
<a href="https://shields.io/"><img alt="Generic badge" src="https://img.shields.io/badge/MSVC-17+-blue.svg" /></a></p>
|
||||
<a href="https://shields.io/"><img alt="Generic badge" src="https://img.shields.io/badge/MSVC-17+-blue.svg" /></a>
|
||||
<a href="https://conan.io/center/recipes/reflect-cpp"><img alt="Conan Center" src="https://img.shields.io/conan/v/reflect-cpp" /></a></p>
|
||||
<p><strong>📖 Documentation</strong>: <a href="https://rfl.getml.com">https://rfl.getml.com</a> — <strong>👨💻 Source Code</strong>: <a href="https://github.com/getml/reflect-cpp">https://github.com/getml/reflect-cpp</a></p>
|
||||
</div>
|
||||
<blockquote>
|
||||
|
||||
+38
-15
@@ -828,10 +828,10 @@
|
||||
<ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#option-1-include-source-files-into-your-own-build" class="md-nav__link">
|
||||
<a href="#option-1-using-conan" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
|
||||
Option 1: Include source files into your own build
|
||||
Option 1: Using Conan
|
||||
|
||||
</span>
|
||||
</a>
|
||||
@@ -850,10 +850,21 @@
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#option-3-compilation-using-cmake-and-vcpkg" class="md-nav__link">
|
||||
<a href="#option-3-include-source-files-into-your-own-build" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
|
||||
Option 3: Compilation using cmake and vcpkg
|
||||
Option 3: Include source files into your own build
|
||||
|
||||
</span>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#option-4-compilation-using-cmake-and-vcpkg" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
|
||||
Option 4: Compilation using cmake and vcpkg
|
||||
|
||||
</span>
|
||||
</a>
|
||||
@@ -2298,10 +2309,10 @@
|
||||
<ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#option-1-include-source-files-into-your-own-build" class="md-nav__link">
|
||||
<a href="#option-1-using-conan" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
|
||||
Option 1: Include source files into your own build
|
||||
Option 1: Using Conan
|
||||
|
||||
</span>
|
||||
</a>
|
||||
@@ -2320,10 +2331,21 @@
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#option-3-compilation-using-cmake-and-vcpkg" class="md-nav__link">
|
||||
<a href="#option-3-include-source-files-into-your-own-build" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
|
||||
Option 3: Compilation using cmake and vcpkg
|
||||
Option 3: Include source files into your own build
|
||||
|
||||
</span>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#option-4-compilation-using-cmake-and-vcpkg" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
|
||||
Option 4: Compilation using cmake and vcpkg
|
||||
|
||||
</span>
|
||||
</a>
|
||||
@@ -2379,18 +2401,19 @@
|
||||
- Clang 14.0 or higher
|
||||
- MSVC 17.8 (19.38) or higher</p>
|
||||
<p>You can include the source files into your build or compile it using cmake and vcpkg.</p>
|
||||
<h2 id="option-1-include-source-files-into-your-own-build">Option 1: Include source files into your own build<a class="headerlink" href="#option-1-include-source-files-into-your-own-build" title="Permanent link">¶</a></h2>
|
||||
<p>Simply copy the contents of the folders <code>include</code> and <code>src</code> into your source repository or add it to your include path and also add <code>src/reflectcpp.cpp</code> and <code>src/reflectcpp_json.cpp</code> and <code>src/yyjson.c</code> to your source files for compilation.
|
||||
If you want to link to your own version of YYJSON, then only add <code>src/reflectcpp.cpp</code> and <code>src/reflectcpp_json.cpp</code>. If you don't need JSON support, then only add <code>src/reflectcpp.cpp</code>.</p>
|
||||
<p>If you need support for other serialization formats like flexbuffers or XML, you should also add <code>src/reflectcpp_<format>.cpp</code> and include and link the respective libraries, as listed in the section on serialization formats.</p>
|
||||
<h2 id="option-1-using-conan">Option 1: Using Conan<a class="headerlink" href="#option-1-using-conan" title="Permanent link">¶</a></h2>
|
||||
<p>Simply use the following <a href="https://conan.io/center/recipes/reflect-cpp">recipe</a>.</p>
|
||||
<h2 id="option-2-compilation-using-cmake">Option 2: Compilation using cmake<a class="headerlink" href="#option-2-compilation-using-cmake" title="Permanent link">¶</a></h2>
|
||||
<p>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.</p>
|
||||
<p>This will compile reflect-cpp with JSON support only. You can then include reflect-cpp in your project and link to the binary.</p>
|
||||
<div class="language-bash highlight"><pre><span></span><code>cmake<span class="w"> </span>-S<span class="w"> </span>.<span class="w"> </span>-B<span class="w"> </span>build<span class="w"> </span>-DCMAKE_BUILD_TYPE<span class="o">=</span>Release
|
||||
cmake<span class="w"> </span>--build<span class="w"> </span>build<span class="w"> </span>-j<span class="w"> </span><span class="m">4</span><span class="w"> </span><span class="c1"># gcc, clang</span>
|
||||
cmake<span class="w"> </span>--build<span class="w"> </span>build<span class="w"> </span>--config<span class="w"> </span>Release<span class="w"> </span>-j<span class="w"> </span><span class="m">4</span><span class="w"> </span><span class="c1"># MSVC</span>
|
||||
</code></pre></div>
|
||||
<h2 id="option-3-compilation-using-cmake-and-vcpkg">Option 3: Compilation using cmake and vcpkg<a class="headerlink" href="#option-3-compilation-using-cmake-and-vcpkg" title="Permanent link">¶</a></h2>
|
||||
<h2 id="option-3-include-source-files-into-your-own-build">Option 3: Include source files into your own build<a class="headerlink" href="#option-3-include-source-files-into-your-own-build" title="Permanent link">¶</a></h2>
|
||||
<p>Simply copy the contents of the folders <code>include</code> and <code>src</code> into your source repository or add it to your include path and also add <code>src/reflectcpp.cpp</code> and <code>src/reflectcpp_json.cpp</code> and <code>src/yyjson.c</code> to your source files for compilation.
|
||||
If you want to link to your own version of YYJSON, then only add <code>src/reflectcpp.cpp</code> and <code>src/reflectcpp_json.cpp</code>. If you don't need JSON support, then only add <code>src/reflectcpp.cpp</code>.</p>
|
||||
<p>If you need support for other serialization formats like flexbuffers or XML, you should also add <code>src/reflectcpp_<format>.cpp</code> and include and link the respective libraries, as listed in the section on serialization formats.</p>
|
||||
<h2 id="option-4-compilation-using-cmake-and-vcpkg">Option 4: Compilation using cmake and vcpkg<a class="headerlink" href="#option-4-compilation-using-cmake-and-vcpkg" title="Permanent link">¶</a></h2>
|
||||
<p>If you want serialization formats other than JSON, you can either install them manually or use vcpkg.</p>
|
||||
<p>To install vcpkg:</p>
|
||||
<div class="language-bash highlight"><pre><span></span><code>git<span class="w"> </span>submodule<span class="w"> </span>update<span class="w"> </span>--init
|
||||
|
||||
Binary file not shown.
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user