flatbuffers
flatbuffers copied to clipboard
Flatc does not get build when including the flatbuffer source inside our own cmake project
I followed the instructions here: https://google.github.io/flatbuffers/flatbuffers_guide_building.html
which says that I simply can put following in my own cmake project:
# Add FlatBuffers directly to our build. This defines the `flatbuffers` target.
add_subdirectory(${FLATBUFFERS_SRC_DIR}
${CMAKE_CURRENT_BINARY_DIR}/flatbuffers-build
EXCLUDE_FROM_ALL)
While this produces the library files (libflatbuffers.a) it does not produce the flatc compiler. I need to manually go inside the directory and do a make ? Is that intended ?
Hmm, I'm not sure that is supposed to make the flatc compiler. The add_subdirectory is just linking in the cmake rules, you will still need to explicitly make the flatc target in your project.