* wip : creating a Swift Package Manager package

* ios : tests ready

* cmake : add ggwave-spm and spm-publish targets

* cosmetics
This commit is contained in:
Georgi Gerganov
2021-01-30 12:38:01 +02:00
committed by GitHub
parent 555495f7cb
commit 2e34d46e02
15 changed files with 61 additions and 25 deletions

View File

@@ -12,7 +12,7 @@ if (EMSCRIPTEN)
VERBATIM
)
add_custom_target(npm-publish
add_custom_target(publish-npm
DEPENDS javascript/publish.log
)
endif()
@@ -53,8 +53,41 @@ if (GGWAVE_SUPPORT_PYTHON)
VERBATIM
)
add_custom_target(pypi-publish
add_custom_target(publish-pypi
DEPENDS python/dist
)
endif()
if (GGWAVE_SUPPORT_SWIFT)
file(GLOB_RECURSE GGWAVE_SOURCES "../include/*" "../src/*")
add_custom_command(
OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/ios/.build
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/ios/Makefile
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/ios/Package.swift
DEPENDS ${GGWAVE_SOURCES}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/ios
COMMAND make clean
COMMAND make build-submodule
COMMENT "Compiling Swift package"
VERBATIM
)
add_custom_target(ggwave-spm ALL
DEPENDS ios/.build
)
add_custom_command(
OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/ios/publish
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/ios/publish-trigger
DEPENDS ${GGWAVE_SOURCES}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/ios
COMMAND make publish
COMMENT "Publishing Swift package v${PROJECT_VERSION}"
VERBATIM
)
add_custom_target(publish-spm
DEPENDS ios/publish
)
endif()

1
bindings/ios Submodule

Submodule bindings/ios added at 8c9b385c66