flatbuffers icon indicating copy to clipboard operation
flatbuffers copied to clipboard

Flatc does not get build when including the flatbuffer source inside our own cmake project

Open akjt opened this issue 3 years ago • 1 comments

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 ?

akjt avatar Jul 23 '22 07:07 akjt

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.

dbaileychess avatar Jul 26 '22 22:07 dbaileychess