File tree Expand file tree Collapse file tree 15 files changed +61
-25
lines changed
Expand file tree Collapse file tree 15 files changed +61
-25
lines changed Original file line number Diff line number Diff line change @@ -6,3 +6,4 @@ compile_commands.json
66.vimspector.json
77. * .swp
88.ycm_extra_conf.py
9+ .DS_Store
Original file line number Diff line number Diff line change 44[submodule "examples/third-party/ggsock "]
55 path = examples/third-party/ggsock
66 url = https://github.com/ggerganov/ggsock
7+ [submodule "bindings/ios "]
8+ path = bindings/ios
9+ url = https://github.com/ggerganov/ggwave-spm
Original file line number Diff line number Diff line change @@ -2,9 +2,10 @@ cmake_minimum_required (VERSION 3.0)
22project (ggwave VERSION 0.1.5)
33
44# configure project version
5- configure_file (${CMAKE_SOURCE_DIR} /README.md .tmpl ${CMAKE_SOURCE_DIR} /README.md @ONLY)
6- configure_file (${CMAKE_SOURCE_DIR} /bindings/python/setup.py.tmpl ${CMAKE_SOURCE_DIR} /bindings/python/setup.py @ONLY)
5+ configure_file (${CMAKE_SOURCE_DIR} /README-tmpl .md ${CMAKE_SOURCE_DIR} /README.md @ONLY)
6+ configure_file (${CMAKE_SOURCE_DIR} /bindings/python/setup-tmpl .py ${CMAKE_SOURCE_DIR} /bindings/python/setup.py @ONLY)
77configure_file (${CMAKE_SOURCE_DIR} /bindings/javascript/package-tmpl.json ${CMAKE_SOURCE_DIR} /bindings/javascript/package.json @ONLY)
8+ configure_file (${CMAKE_SOURCE_DIR} /bindings/ios/Makefile-tmpl ${CMAKE_SOURCE_DIR} /bindings/ios/Makefile @ONLY)
89
910set (CMAKE_EXPORT_COMPILE_COMMANDS "on" )
1011set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR} /bin)
@@ -39,6 +40,7 @@ option(GGWAVE_SANITIZE_UNDEFINED "ggwave: enable undefined sanitizer" OFF)
3940
4041option (GGWAVE_SUPPORT_SDL2 "ggwave: support for libSDL2" ${GGWAVE_SUPPORT_SDL2_DEFAULT} )
4142option (GGWAVE_SUPPORT_PYTHON "ggwave: support for python" OFF )
43+ option (GGWAVE_SUPPORT_SWIFT "ggwave: support for swift" OFF )
4244
4345option (GGWAVE_BUILD_TESTS "ggwave: build examples" ${GGWAVE_STANDALONE} )
4446option (GGWAVE_BUILD_EXAMPLES "ggwave: build examples" ${GGWAVE_STANDALONE} )
Original file line number Diff line number Diff line change @@ -158,6 +158,10 @@ npm install ggwave
158158
159159More info: https://www.npmjs.com/package/ggwave
160160
161+ ### iOS
162+
163+ Available as a Swift Package: https://github.com/ggerganov/ggwave-spm
164+
161165## Installing the Waver application
162166
163167[ ![ Get it from the Snap Store] ( https://snapcraft.io/static/images/badges/en/snap-store-black.svg )] ( https://snapcraft.io/waver )
Original file line number Diff line number Diff line change @@ -158,6 +158,10 @@ npm install ggwave
158158
159159More info: https://www.npmjs.com/package/ggwave
160160
161+ ### iOS
162+
163+ Available as a Swift Package: https://github.com/ggerganov/ggwave-spm
164+
161165## Installing the Waver application
162166
163167[ ![ Get it from the Snap Store] ( https://snapcraft.io/static/images/badges/en/snap-store-black.svg )] ( https://snapcraft.io/waver )
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ if (EMSCRIPTEN)
1212 VERBATIM
1313 )
1414
15- add_custom_target (npm- publish
15+ add_custom_target (publish-npm
1616 DEPENDS javascript/publish.log
1717 )
1818endif ()
@@ -53,8 +53,41 @@ if (GGWAVE_SUPPORT_PYTHON)
5353 VERBATIM
5454 )
5555
56- add_custom_target (pypi- publish
56+ add_custom_target (publish-pypi
5757 DEPENDS python/dist
5858 )
5959endif ()
6060
61+ if (GGWAVE_SUPPORT_SWIFT)
62+ file (GLOB_RECURSE GGWAVE_SOURCES "../include/*" "../src/*" )
63+
64+ add_custom_command (
65+ OUTPUT ${CMAKE_CURRENT_SOURCE_DIR} /ios/.build
66+ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR} /ios/Makefile
67+ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR} /ios/Package.swift
68+ DEPENDS ${GGWAVE_SOURCES}
69+ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} /ios
70+ COMMAND make clean
71+ COMMAND make build -submodule
72+ COMMENT "Compiling Swift package"
73+ VERBATIM
74+ )
75+
76+ add_custom_target (ggwave-spm ALL
77+ DEPENDS ios/.build
78+ )
79+
80+ add_custom_command (
81+ OUTPUT ${CMAKE_CURRENT_SOURCE_DIR} /ios/publish
82+ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR} /ios/publish-trigger
83+ DEPENDS ${GGWAVE_SOURCES}
84+ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} /ios
85+ COMMAND make publish
86+ COMMENT "Publishing Swift package v${PROJECT_VERSION} "
87+ VERBATIM
88+ )
89+
90+ add_custom_target (publish-spm
91+ DEPENDS ios/publish
92+ )
93+ endif ()
File renamed without changes.
Original file line number Diff line number Diff line change 11set (TARGET ggwave-wasm)
22
3- configure_file (${CMAKE_CURRENT_SOURCE_DIR} /build_timestamp.h.tmpl ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} /${TARGET} /build_timestamp.h @ONLY)
3+ configure_file (${CMAKE_CURRENT_SOURCE_DIR} /build_timestamp-tmpl.h ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} /${TARGET} /build_timestamp.h @ONLY)
44
55add_executable (${TARGET}
66 main.cpp
File renamed without changes.
You can’t perform that action at this time.
0 commit comments