Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a libflatbuffers for other projects to use #238

Merged
1 commit merged into from
Jul 22, 2015
Merged

Conversation

martell
Copy link
Contributor

@martell martell commented Jul 22, 2015

Add's an option to cmake to build a static library
So that 3rd party projects can use flatbuffers without having to compiler source

@ghost
Copy link

ghost commented Jul 22, 2015

Thanks! Why are all the language generators in this library, though? presumably they're only useful for flatc. The only use case for a library is if you want to do JSON parsing/reading, which is covered by idl_parser.cpp and idl_gen_text.cpp.

@martell
Copy link
Contributor Author

martell commented Jul 22, 2015

Hi :)

I based it from what cocos2d-x was using in its game engine
https://github.com/cocos2d/cocos2d-x-3rd-party-libs-bin/blob/v3/flatbuffers/CMakeLists.txt

I didn't actually look at the sources when I made it heh.

I can move them into flatc_sources if you want ?

Thanks for taking the time to look also :)

@ghost
Copy link

ghost commented Jul 22, 2015

Yes, best to keep idl_gen-* (except idl_gen.text.cpp) in FlatBuffers_Compiler_SRCS, since no library user will ever need them.

@martell
Copy link
Contributor Author

martell commented Jul 22, 2015

done :)

@ghost
Copy link

ghost commented Jul 22, 2015

You mean idl_gen_cpp.cpp ? That generates the c++ code, which should never be needed at runtime.

@martell
Copy link
Contributor Author

martell commented Jul 22, 2015

Yeah I realized after looking at it which is why I removed the comment :)

ghost pushed a commit that referenced this pull request Jul 22, 2015
Add a libflatbuffers for other projects to use
@ghost ghost merged commit 07e77ad into google:master Jul 22, 2015
@ghost
Copy link

ghost commented Jul 22, 2015

Thanks :)

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant