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
Copy file name to clipboardExpand all lines: README.md
+7-10Lines changed: 7 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,7 @@ Design principles for reflect-cpp include:
18
18
- Close integration with containers from the C++ standard library
19
19
- Close adherence to C++ idioms
20
20
- Out-of-the-box support for JSON
21
-
- Simple installation: If no JSON support is required, reflect-cpp is header-only. For JSON support, only a single source file needs to be compiled.
21
+
- Simple installation
22
22
- Simple extendability to other serialization formats
23
23
- Simple extendability to custom classes
24
24
@@ -520,17 +520,14 @@ The following compilers are supported:
520
520
- Clang 14.0 or higher
521
521
- MSVC 17.8 (19.38) or higher
522
522
523
-
### Option 1: Header-only
523
+
### Option 1: Include source files into your own build
524
524
525
-
If you **do not** need JSON support or you want to link YYJSON yourself, then reflect-cpp is header-only. Simply copy the contents of the folder `include` into your source repository or add it to your include path.
526
-
527
-
### Option 2: Include source files into your own build
528
-
529
-
Simply copy the contents of the folder `include` into your source repository or add it to your include path and also add `src/yyjson.c` to your source files for compilation.
525
+
Simply copy the contents of the folder `include` into your source repository or add it to your include path and also add `src/reflectcpp.cpp` and `src/yyjson.c` to your source files for compilation.
526
+
If you want to link to your own version of yyjson, then only copy `src/reflectcpp.cpp`.
530
527
531
528
If you need support for other serialization formats like flexbuffers or XML, you should also include and link the respective libraries, as listed in the section on serialization formats.
532
529
533
-
### Option 3: Compilation using cmake
530
+
### Option 2: Compilation using cmake
534
531
535
532
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
If you want serialization formats other than JSON, you can either install them manually or use vcpkg.
547
544
@@ -636,7 +633,7 @@ To run the tests, do the following:
636
633
637
634
### Make sure includes are relative
638
635
639
-
In order for the library to be able to function header-only, we need internal includes to be relative and not depend on any externally set include directory.
636
+
We need internal includes to be relative and not depend on any externally set include directory.
640
637
641
638
That is, for example, if you are within any file in `rfl/internal`, prefer
0 commit comments