Skip to content

Commit 0adfb55

Browse files
committed
Minor README edits
1 parent 5411c9c commit 0adfb55

File tree

1 file changed

+11
-12
lines changed

1 file changed

+11
-12
lines changed

README.md

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -129,17 +129,20 @@ To create another test project named foobar, call `scripts/setup.sh -s -x
129129

130130
### Integrating FlatCC
131131

132-
To answer: "How do I integrate FlatCC into my project":
132+
To answer the question:
133133

134-
You do not need CMake and you do not need a prebuilt runtime library, though you can.
134+
> "How do I integrate FlatCC into my project with minimal dependencies"
135135
136-
You need to:
136+
You do not need CMake and you do not need a prebuilt runtime library,
137137

138-
- Generate files with the flatcc tool, and include them.
139-
- Add `include/flatcc` in the include path (correct version), using `-I include` if at flatcc root.
140-
- Link with zero or more from `src/runtime/*.c` (correct version).
141-
- Possibly disable certain warnings (notably disable GCC pedantic). The main CMake project does that for you.
142-
- Potentially work around platform limitations, often using `-DPORTABLE_...=0/1`, e.g. if `stdalign.h`
138+
You do need the `flatcc` tool to initially generate your own schema files and
139+
then you need to update your project to:
140+
141+
- Include the generated header files.
142+
- Add `include/flatcc` (correct version) to the include path, e.g., using `-I include` if at flatcc root.
143+
- Link with zero or more files from `src/runtime/*.c` (correct version).
144+
- Possibly disable certain warnings (notably disable GCC pedantic).
145+
- Potentially work around platform limitations, e.g., using `-DPORTABLE_HAS_INCLUDE_STDALIGN=0` if `stdalign.h`
143146
should be, but isn't, available on your platform. See `include/flatcc/portable/*.h` for details.
144147

145148
You should be able to compile a test project with just a single line like:
@@ -151,10 +154,6 @@ cc -I include src/runtime/build.c myprogram.c
151154
If you only read flatbuffer files, and do not build, verify, parse JSON, or print JSON,
152155
you will not need any runtime `.c` files.
153156

154-
You can look at the `../monster/scritps/build.sh` file to see how a minimal
155-
build is configured, though you might want to replace the library with `.c`
156-
files directly to minimize build dependencies.
157-
158157
If you have a system installed `flatcc` package, it might have the wrong
159158
version of header or library files. You need to somehow override that if you
160159
have generated files from a more recent version of flatcc.

0 commit comments

Comments
 (0)