smanders / externpro

build external projects with cmake
MIT License
13 stars 12 forks source link

flatbuffers 2.0.6 #336

Closed smanders closed 2 years ago

smanders commented 2 years ago

flatbuffers 1.12.0 was added https://github.com/smanders/externpro/issues/283 flatbuffers patch https://github.com/google/flatbuffers/compare/v1.12.0...smanders:xp1.12.0 project file https://github.com/smanders/externpro/blob/22.01/projects/flatbuffers.cmake use script https://github.com/smanders/externpro/blob/22.01/projects/use/usexp-flatbuffers-config.cmake

flatbuffers 2.0.0 was released 2021.05.10 https://github.com/google/flatbuffers/releases add function to use script that generates ts files https://isrhub.usurf.usu.edu/webpro/webpro/issues/335#issuecomment-229296 and https://isrhub.usurf.usu.edu/webpro/webpro/blob/bbfbffee7c0cb898a3410b619d9bd40fe10d2f32/projects/use/usexp-flatbuffers-config.cmake

smanders commented 2 years ago

maybe some of this modified custom_[command|target] https://isrhub.usurf.usu.edu/ajgraham/VIVID/pull/40/files#diff-68129959ea1d08af65ace715a984d7019ccaf4050fe64db39f39532020eb892e -- nah this is protobuf, not flatbuffers...

camerbam commented 2 years ago

More or less the command needs to be: flatc.exe --ts --filename-suffix ".fb" -o Or at least, that is what we have used

DeanLanier commented 2 years ago

More or less the command needs to be: flatc.exe --ts --filename-suffix ".fb" -o Or at least, that is what we have used

It's actually even simpler: flatc.exe --ts -o outputDir *.fbs is what I used.

smanders commented 2 years ago

flatbuffers 2.0.0 was released 2021.05.10 (as noted in the original description) and is on their releases https://github.com/google/flatbuffers/releases page

but there are also two additional tags: v2.0.5 (2021.12.09) and v2.0.6 (2022.02.15), so I will assume there's good stuff (there are a lot of commits) and go with the latest v2.0.6

smanders commented 2 years ago

flatbuffers 2.0.6 patch https://github.com/google/flatbuffers/compare/v2.0.6...smanders:xp2.0.6

smanders commented 2 years ago

completed with commits referenced above (and one below...)

smanders commented 2 years ago

NOTES SensorManager changes to leverage the new xpFlatBuffersBuildTS() cmake function to generate typescript files

diff --git a/WebServer/CMakeLists.txt b/WebServer/CMakeLists.txt index 0bfe9cb..6ca42ec 100644 --- a/WebServer/CMakeLists.txt +++ b/WebServer/CMakeLists.txt @@ -60,17 +60,10 @@ set(src_libs_messaging_srcs source_group(src\libs\messaging FILES ${src_libs_messaging_srcs}) list(APPEND ${PROJECT_NAME}_prjsrcs ${src_libs_messaging_srcs}) ####################################### -# TODO: Remove these generated flatbuffer files and add them to the .gitignore file once they are generated with cmake. -set(src_libs_messaging_fb-schemas_sensor_manager_srcs

smanders commented 2 years ago

the debug build of flatc doesn't need to be installed as part of externpro (and neither does the debug build of protoc executable)

smanders commented 2 years ago

completed with commits referenced above