Skip to content

Commit

Permalink
Merge pull request #207 from agri-gaia/feat/generate-ts-flatbuffers
Browse files Browse the repository at this point in the history
generate typescript flatbuffer files for the seerep-viewer.
  • Loading branch information
Mark-Niemeyer authored Oct 27, 2022
2 parents 4e5f0fb + c4ce885 commit 37fb982
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
9 changes: 8 additions & 1 deletion seerep-com/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ endforeach()
add_custom_target(fbpyschemas)
add_custom_command(
TARGET fbpyschemas
COMMAND flatc -p --grpc "*.fbs"
COMMAND flatc -p -T --grpc "*.fbs"
DEPENDS fbpyschemas
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/fbs/")

Expand Down Expand Up @@ -139,6 +139,13 @@ write_basic_package_version_file(
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}
FILES_MATCHING PATTERN "*.py")

# install the generated typescript sources
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}
FILES_MATCHING PATTERN "*.ts")
# install the generated javascript sources
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}
FILES_MATCHING PATTERN "*.js")

# install the configuration file
install(FILES
${CMAKE_CURRENT_BINARY_DIR}/SeerepComConfig.cmake
Expand Down
3 changes: 3 additions & 0 deletions seerep-msgs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,9 @@ write_basic_package_version_file(
# install the generated python sources
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}
FILES_MATCHING PATTERN "*.py")
# install the generated typescript sources
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}
FILES_MATCHING PATTERN "*.ts")

set(SEEREP_COM_DIR ${CMAKE_CURRENT_BINARY_DIR}/../seerep-com/fbs)

Expand Down
2 changes: 1 addition & 1 deletion seerep-msgs/cmake/BuildFlatBuffers.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ function(build_flatbuffers flatbuffers_schemas
COMMAND ${FLATC} ${FLATC_SCHEMA_ARGS}
-o ${generated_includes_dir}
${include_params}
-c -p ${schema}
-c -p -T ${schema}
# --filename-suffix ".fb"
DEPENDS ${FLATC_TARGET} ${schema} ${additional_dependencies}
WORKING_DIRECTORY "${working_dir}")
Expand Down

0 comments on commit 37fb982

Please sign in to comment.