Create go package via CMake.
@@ -1228,6 +1228,29 @@ if(${TINYSPLINE_BINDING_REQUESTED})
${CMAKE_COMMAND} -E copy
"${TINYSPLINE_GO_SOURCE_DIRECTORY}/${TINYSPLINE_GO_CMAKE_TARGET}.go"
"${TINYSPLINE_GO_INTERFACE_FILE}")
+ add_custom_command(
+ TARGET ${TINYSPLINE_GO_CMAKE_TARGET}
+ POST_BUILD
+ COMMAND
+ ${CMAKE_COMMAND} -E make_directory
+ "${TINYSPLINE_BINARY_DIR}/go/${TINYSPLINE_PLATFORM}"
+ COMMAND
+ ${CMAKE_COMMAND} -E copy
+ "${TINYSPLINE_GO_INTERFACE_FILE}"
+ "${TINYSPLINE_BINARY_DIR}/go/"
+ COMMAND
+ ${CMAKE_COMMAND} -E copy
+ "${TINYSPLINE_OUTPUT_DIRECTORY}/$<TARGET_FILE_NAME:${TINYSPLINE_GO_CMAKE_TARGET}>"
+ "${TINYSPLINE_BINARY_DIR}/go/${TINYSPLINE_PLATFORM}")
+ add_custom_command(
+ TARGET ${TINYSPLINE_GO_CMAKE_TARGET}
+ POST_BUILD
+ COMMAND
+ ${CMAKE_COMMAND} -E tar "cvf"
+ "${TINYSPLINE_BINARY_DIR}/tinyspline-go.zip"
+ --format=zip
+ -- .
+ WORKING_DIRECTORY "${TINYSPLINE_BINARY_DIR}/go")
endif()
# Java
