Skip to content

Commit

Permalink
Swift Bindings with updated cmake files and standalone executable CI …
Browse files Browse the repository at this point in the history
…tests
  • Loading branch information
ScottThomasMiller committed Apr 18, 2024
1 parent 778993c commit e2d0f24
Show file tree
Hide file tree
Showing 70 changed files with 8,834 additions and 5 deletions.
79 changes: 79 additions & 0 deletions .github/workflows/run_unix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,51 @@ jobs:
sudo -H python3 -m pip install -U .
- name: Install Python test Dependencies
run: sudo -H python3 -m pip install -r $GITHUB_WORKSPACE/python_package/examples/tests/requirements.txt
# build Swift tests:
- name: build band_power Swift
run: |
cd $GITHUB_WORKSPACE/swift_package/BrainFlowCI
xcodebuild -project BrainFlowCI.xcodeproj -destination 'platform=My Mac' -scheme band_power
- name: build band_power_all Swift
run: |
cd $GITHUB_WORKSPACE/swift_package/BrainFlowCI
xcodebuild -project BrainFlowCI.xcodeproj -destination 'platform=My Mac' -scheme band_power_all
- name: build brainflow_get_data Swift
run: |
cd $GITHUB_WORKSPACE/swift_package/BrainFlowCI
xcodebuild -project BrainFlowCI.xcodeproj -destination 'platform=My Mac' -scheme brainflow_get_data
- name: build denoising Swift
run: |
cd $GITHUB_WORKSPACE/swift_package/BrainFlowCI
xcodebuild -project BrainFlowCI.xcodeproj -destination 'platform=My Mac' -scheme denoising
- name: build downsampling Swift
run: |
cd $GITHUB_WORKSPACE/swift_package/BrainFlowCI
xcodebuild -project BrainFlowCI.xcodeproj -destination 'platform=My Mac' -scheme downsampling
- name: build eeg_metrics Swift
run: |
cd $GITHUB_WORKSPACE/swift_package/BrainFlowCI
xcodebuild -project BrainFlowCI.xcodeproj -destination 'platform=My Mac' -scheme eeg_metrics
- name: build ica Swift
run: |
cd $GITHUB_WORKSPACE/swift_package/BrainFlowCI
xcodebuild -project BrainFlowCI.xcodeproj -destination 'platform=My Mac' -scheme ica
- name: build markers Swift
run: |
cd $GITHUB_WORKSPACE/swift_package/BrainFlowCI
xcodebuild -project BrainFlowCI.xcodeproj -destination 'platform=My Mac' -scheme markers
- name: build read_write_file Swift
run: |
cd $GITHUB_WORKSPACE/swift_package/BrainFlowCI
xcodebuild -project BrainFlowCI.xcodeproj -destination 'platform=My Mac' -scheme read_write_file
- name: build signal_filtering Swift
run: |
cd $GITHUB_WORKSPACE/swift_package/BrainFlowCI
xcodebuild -project BrainFlowCI.xcodeproj -destination 'platform=My Mac' -scheme signal_filtering
- name: build transforms Swift
run: |
cd $GITHUB_WORKSPACE/swift_package/BrainFlowCI
xcodebuild -project BrainFlowCI.xcodeproj -destination 'platform=My Mac' -scheme transforms
# start testing
- name: Run unit tests
Expand Down Expand Up @@ -415,3 +460,37 @@ jobs:
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
- name: band_power Swift
run: |
$GITHUB_WORKSPACE/swift_package/BrainFlowCI/Build/Products/Debug/band_power
- name: band_power_all Swift
run: |
$GITHUB_WORKSPACE/swift_package/BrainFlowCI/Build/Products/Debug/band_power_all
- name: brainflow_get_data Swift
run: |
$GITHUB_WORKSPACE/swift_package/BrainFlowCI/Build/Products/Debug/brainflow_get_data
- name: denoising Swift
run: |
$GITHUB_WORKSPACE/swift_package/BrainFlowCI/Build/Products/Debug/denoising
- name: downsampling Swift
run: |
$GITHUB_WORKSPACE/swift_package/BrainFlowCI/Build/Products/Debug/downsampling
- name: eeg_metrics Swift
run: |
$GITHUB_WORKSPACE/swift_package/BrainFlowCI/Build/Products/Debug/eeg_metrics
- name: ica Swift
run: |
$GITHUB_WORKSPACE/swift_package/BrainFlowCI/Build/Products/Debug/ica
- name: markers Swift
run: |
$GITHUB_WORKSPACE/swift_package/BrainFlowCI/Build/Products/Debug/markers
- name: read_write_file Swift
run: |
$GITHUB_WORKSPACE/swift_package/BrainFlowCI/Build/Products/Debug/read_write_file
- name: signal_filtering Swift
run: |
$GITHUB_WORKSPACE/swift_package/BrainFlowCI/Build/Products/Debug/signal_filtering
- name: transforms Swift
run: |
$GITHUB_WORKSPACE/swift_package/BrainFlowCI/Build/Products/Debug/transforms
9 changes: 8 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,7 @@ java_package/brainflow/src/main/resources/
matlab_package/brainflow/inc/
matlab_package/brainflow/lib/
python_package/brainflow/lib/
swift_package/BrainFlow/lib/
rust_package/brainflow/lib/
rust_package/brainflow/inc/
src/ml/train/data/
Expand All @@ -379,4 +380,10 @@ Makefile
CMakeSettings.json
._.gitignore

build/
build/

# swift_package stuff:
*.xcuserdata*
xcuserdata
.DS_Store
swift_package/BrainFlowCI/Frameworks
1 change: 1 addition & 0 deletions src/board_controller/ant_neuro/build.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ if (MSVC)
endif (MSVC)
if (UNIX AND NOT APPLE AND NOT ANDROID)
file (COPY "${CMAKE_CURRENT_SOURCE_DIR}/third_party/ant_neuro/linux/${ANT_LIB_NAME}" DESTINATION "${CMAKE_CURRENT_SOURCE_DIR}/csharp_package/brainflow/brainflow/lib/")
file (COPY "${CMAKE_CURRENT_SOURCE_DIR}/third_party/ant_neuro/linux/${ANT_LIB_NAME}" DESTINATION "${CMAKE_CURRENT_SOURCE_DIR}/swift_package/BrainFlow/lib/")
file (COPY "${CMAKE_CURRENT_SOURCE_DIR}/third_party/ant_neuro/linux/${ANT_LIB_NAME}" DESTINATION "${CMAKE_CURRENT_SOURCE_DIR}/python_package/brainflow/lib/")
file (COPY "${CMAKE_CURRENT_SOURCE_DIR}/third_party/ant_neuro/linux/${ANT_LIB_NAME}" DESTINATION "${CMAKE_CURRENT_SOURCE_DIR}/julia_package/brainflow/lib/")
file (COPY "${CMAKE_CURRENT_SOURCE_DIR}/third_party/ant_neuro/linux/${ANT_LIB_NAME}" DESTINATION "${CMAKE_CURRENT_SOURCE_DIR}/java_package/brainflow/src/main/resources/")
Expand Down
1 change: 1 addition & 0 deletions src/board_controller/build.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ if (MSVC)
endif (MSVC)
if (UNIX AND NOT ANDROID)
add_custom_command (TARGET ${BOARD_CONTROLLER_NAME} POST_BUILD
COMMAND "${CMAKE_COMMAND}" -E copy_if_different "${CMAKE_CURRENT_SOURCE_DIR}/compiled/${BOARD_CONTROLLER_COMPILED_NAME}" "${CMAKE_CURRENT_SOURCE_DIR}/swift_package/BrainFlow/lib/${BOARD_CONTROLLER_COMPILED_NAME}"
COMMAND "${CMAKE_COMMAND}" -E copy_if_different "${CMAKE_CURRENT_SOURCE_DIR}/compiled/${BOARD_CONTROLLER_COMPILED_NAME}" "${CMAKE_CURRENT_SOURCE_DIR}/nodejs_package/brainflow/lib/${BOARD_CONTROLLER_COMPILED_NAME}"
COMMAND "${CMAKE_COMMAND}" -E copy_if_different "${CMAKE_CURRENT_SOURCE_DIR}/compiled/${BOARD_CONTROLLER_COMPILED_NAME}" "${CMAKE_CURRENT_SOURCE_DIR}/python_package/brainflow/lib/${BOARD_CONTROLLER_COMPILED_NAME}"
COMMAND "${CMAKE_COMMAND}" -E copy_if_different "${CMAKE_CURRENT_SOURCE_DIR}/compiled/${BOARD_CONTROLLER_COMPILED_NAME}" "${CMAKE_CURRENT_SOURCE_DIR}/julia_package/brainflow/lib/${BOARD_CONTROLLER_COMPILED_NAME}"
Expand Down
2 changes: 2 additions & 0 deletions src/board_controller/gtec/build.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@ if (MSVC)
endif (MSVC)
if (UNIX AND NOT APPLE AND NOT ANDROID)
file (COPY "${CMAKE_CURRENT_SOURCE_DIR}/third_party/unicorn/lib/libunicorn.so" DESTINATION "${CMAKE_CURRENT_SOURCE_DIR}/csharp_package/brainflow/brainflow/lib/")
file (COPY "${CMAKE_CURRENT_SOURCE_DIR}/third_party/unicorn/lib/libunicorn.so" DESTINATION "${CMAKE_CURRENT_SOURCE_DIR}/swift_package/BrainFlow/lib/")
file (COPY "${CMAKE_CURRENT_SOURCE_DIR}/third_party/unicorn/lib/libunicorn.so" DESTINATION "${CMAKE_CURRENT_SOURCE_DIR}/python_package/brainflow/lib/")
file (COPY "${CMAKE_CURRENT_SOURCE_DIR}/third_party/unicorn/lib/libunicorn.so" DESTINATION "${CMAKE_CURRENT_SOURCE_DIR}/julia_package/brainflow/lib/")
file (COPY "${CMAKE_CURRENT_SOURCE_DIR}/third_party/unicorn/lib/libunicorn.so" DESTINATION "${CMAKE_CURRENT_SOURCE_DIR}/java_package/brainflow/src/main/resources/")
file (COPY "${CMAKE_CURRENT_SOURCE_DIR}/third_party/unicorn/lib/libunicorn.so" DESTINATION "${CMAKE_CURRENT_SOURCE_DIR}/matlab_package/brainflow/lib/")
file (COPY "${CMAKE_CURRENT_SOURCE_DIR}/third_party/unicorn/lib/libunicorn_raspberry.so" DESTINATION "${CMAKE_CURRENT_SOURCE_DIR}/csharp_package/brainflow/brainflow/lib/")
file (COPY "${CMAKE_CURRENT_SOURCE_DIR}/third_party/unicorn/lib/libunicorn_raspberry.so" DESTINATION "${CMAKE_CURRENT_SOURCE_DIR}/swift_package/BrainFlow/lib/")
file (COPY "${CMAKE_CURRENT_SOURCE_DIR}/third_party/unicorn/lib/libunicorn_raspberry.so" DESTINATION "${CMAKE_CURRENT_SOURCE_DIR}/python_package/brainflow/lib/")
file (COPY "${CMAKE_CURRENT_SOURCE_DIR}/third_party/unicorn/lib/libunicorn_raspberry.so" DESTINATION "${CMAKE_CURRENT_SOURCE_DIR}/julia_package/brainflow/lib/")
file (COPY "${CMAKE_CURRENT_SOURCE_DIR}/third_party/unicorn/lib/libunicorn_raspberry.so" DESTINATION "${CMAKE_CURRENT_SOURCE_DIR}/java_package/brainflow/src/main/resources/")
Expand Down
3 changes: 2 additions & 1 deletion src/board_controller/muse/muse_bglib/build.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ endif (MSVC)
if (UNIX AND NOT ANDROID)
add_custom_command (TARGET ${MUSE_BLED_LIB} POST_BUILD
COMMAND "${CMAKE_COMMAND}" -E copy_if_different "${CMAKE_CURRENT_SOURCE_DIR}/compiled/${MUSE_BLED_LIB_NAME}" "${CMAKE_CURRENT_SOURCE_DIR}/nodejs_package/brainflow/lib/${MUSE_BLED_LIB_NAME}"
COMMAND "${CMAKE_COMMAND}" -E copy_if_different "${CMAKE_CURRENT_SOURCE_DIR}/compiled/${MUSE_BLED_LIB_NAME}" "${CMAKE_CURRENT_SOURCE_DIR}/swift_package/BrainFlow/lib/${MUSE_BLED_LIB_NAME}"
COMMAND "${CMAKE_COMMAND}" -E copy_if_different "${CMAKE_CURRENT_SOURCE_DIR}/compiled/${MUSE_BLED_LIB_NAME}" "${CMAKE_CURRENT_SOURCE_DIR}/python_package/brainflow/lib/${MUSE_BLED_LIB_NAME}"
COMMAND "${CMAKE_COMMAND}" -E copy_if_different "${CMAKE_CURRENT_SOURCE_DIR}/compiled/${MUSE_BLED_LIB_NAME}" "${CMAKE_CURRENT_SOURCE_DIR}/julia_package/brainflow/lib/${MUSE_BLED_LIB_NAME}"
COMMAND "${CMAKE_COMMAND}" -E copy_if_different "${CMAKE_CURRENT_SOURCE_DIR}/compiled/${MUSE_BLED_LIB_NAME}" "${CMAKE_CURRENT_SOURCE_DIR}/java_package/brainflow/src/main/resources/${MUSE_BLED_LIB_NAME}"
Expand All @@ -78,4 +79,4 @@ install (
LIBRARY DESTINATION lib
INCLUDES DESTINATION inc
ARCHIVE DESTINATION lib
)
)
3 changes: 2 additions & 1 deletion src/board_controller/neuromd/brainbit_bglib/build.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ endif (MSVC)
if (UNIX AND NOT ANDROID)
add_custom_command (TARGET ${BRAINBIT_BLED_LIB} POST_BUILD
COMMAND "${CMAKE_COMMAND}" -E copy_if_different "${CMAKE_CURRENT_SOURCE_DIR}/compiled/${BRAINBIT_BLED_LIB_NAME}" "${CMAKE_CURRENT_SOURCE_DIR}/nodejs_package/brainflow/lib/${BRAINBIT_BLED_LIB_NAME}"
COMMAND "${CMAKE_COMMAND}" -E copy_if_different "${CMAKE_CURRENT_SOURCE_DIR}/compiled/${BRAINBIT_BLED_LIB_NAME}" "${CMAKE_CURRENT_SOURCE_DIR}/swift_package/BrainFlow/lib/${BRAINBIT_BLED_LIB_NAME}"
COMMAND "${CMAKE_COMMAND}" -E copy_if_different "${CMAKE_CURRENT_SOURCE_DIR}/compiled/${BRAINBIT_BLED_LIB_NAME}" "${CMAKE_CURRENT_SOURCE_DIR}/python_package/brainflow/lib/${BRAINBIT_BLED_LIB_NAME}"
COMMAND "${CMAKE_COMMAND}" -E copy_if_different "${CMAKE_CURRENT_SOURCE_DIR}/compiled/${BRAINBIT_BLED_LIB_NAME}" "${CMAKE_CURRENT_SOURCE_DIR}/julia_package/brainflow/lib/${BRAINBIT_BLED_LIB_NAME}"
COMMAND "${CMAKE_COMMAND}" -E copy_if_different "${CMAKE_CURRENT_SOURCE_DIR}/compiled/${BRAINBIT_BLED_LIB_NAME}" "${CMAKE_CURRENT_SOURCE_DIR}/java_package/brainflow/src/main/resources/${BRAINBIT_BLED_LIB_NAME}"
Expand All @@ -74,4 +75,4 @@ install (
LIBRARY DESTINATION lib
INCLUDES DESTINATION inc
ARCHIVE DESTINATION lib
)
)
3 changes: 2 additions & 1 deletion src/board_controller/neuromd/build.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ if (MSVC)
endif (MSVC)
if (APPLE)
file (COPY "${CMAKE_CURRENT_SOURCE_DIR}/third_party/neurosdk/lib/lib${NEUROSDK_LIB_NAME}.dylib" DESTINATION "${CMAKE_CURRENT_SOURCE_DIR}/csharp_package/brainflow/brainflow/lib/")
file (COPY "${CMAKE_CURRENT_SOURCE_DIR}/third_party/neurosdk/lib/lib${NEUROSDK_LIB_NAME}.dylib" DESTINATION "${CMAKE_CURRENT_SOURCE_DIR}/swift_package/BrainFlow/lib/")
file (COPY "${CMAKE_CURRENT_SOURCE_DIR}/third_party/neurosdk/lib/lib${NEUROSDK_LIB_NAME}.dylib" DESTINATION "${CMAKE_CURRENT_SOURCE_DIR}/python_package/brainflow/lib/")
file (COPY "${CMAKE_CURRENT_SOURCE_DIR}/third_party/neurosdk/lib/lib${NEUROSDK_LIB_NAME}.dylib" DESTINATION "${CMAKE_CURRENT_SOURCE_DIR}/julia_package/brainflow/lib/")
file (COPY "${CMAKE_CURRENT_SOURCE_DIR}/third_party/neurosdk/lib/lib${NEUROSDK_LIB_NAME}.dylib" DESTINATION "${CMAKE_CURRENT_SOURCE_DIR}/java_package/brainflow/src/main/resources/")
Expand All @@ -42,4 +43,4 @@ if (APPLE)
${CMAKE_CURRENT_SOURCE_DIR}/third_party/neurosdk/lib/lib${NEUROSDK_LIB_NAME}.dylib
DESTINATION lib
)
endif (APPLE)
endif (APPLE)
1 change: 1 addition & 0 deletions src/board_controller/openbci/ganglion_bglib/build.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ endif (MSVC)
if (UNIX AND NOT ANDROID)
add_custom_command (TARGET ${GANGLION_LIB} POST_BUILD
COMMAND "${CMAKE_COMMAND}" -E copy_if_different "${CMAKE_CURRENT_SOURCE_DIR}/compiled/${GANGLION_LIB_NAME}" "${CMAKE_CURRENT_SOURCE_DIR}/nodejs_package/brainflow/lib/${GANGLION_LIB_NAME}"
COMMAND "${CMAKE_COMMAND}" -E copy_if_different "${CMAKE_CURRENT_SOURCE_DIR}/compiled/${GANGLION_LIB_NAME}" "${CMAKE_CURRENT_SOURCE_DIR}/swift_package/BrainFlow/lib/${GANGLION_LIB_NAME}"
COMMAND "${CMAKE_COMMAND}" -E copy_if_different "${CMAKE_CURRENT_SOURCE_DIR}/compiled/${GANGLION_LIB_NAME}" "${CMAKE_CURRENT_SOURCE_DIR}/python_package/brainflow/lib/${GANGLION_LIB_NAME}"
COMMAND "${CMAKE_COMMAND}" -E copy_if_different "${CMAKE_CURRENT_SOURCE_DIR}/compiled/${GANGLION_LIB_NAME}" "${CMAKE_CURRENT_SOURCE_DIR}/julia_package/brainflow/lib/${GANGLION_LIB_NAME}"
COMMAND "${CMAKE_COMMAND}" -E copy_if_different "${CMAKE_CURRENT_SOURCE_DIR}/compiled/${GANGLION_LIB_NAME}" "${CMAKE_CURRENT_SOURCE_DIR}/java_package/brainflow/src/main/resources/${GANGLION_LIB_NAME}"
Expand Down
1 change: 1 addition & 0 deletions src/data_handler/build.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ if (MSVC)
endif (MSVC)
if (UNIX AND NOT ANDROID)
add_custom_command (TARGET ${DATA_HANDLER_NAME} POST_BUILD
COMMAND "${CMAKE_COMMAND}" -E copy_if_different "${CMAKE_CURRENT_SOURCE_DIR}/compiled/${DATA_HANDLER_COMPILED_NAME}" "${CMAKE_CURRENT_SOURCE_DIR}/swift_package/BrainFlow/lib/${DATA_HANDLER_COMPILED_NAME}"
COMMAND "${CMAKE_COMMAND}" -E copy_if_different "${CMAKE_CURRENT_SOURCE_DIR}/compiled/${DATA_HANDLER_COMPILED_NAME}" "${CMAKE_CURRENT_SOURCE_DIR}/nodejs_package/brainflow/lib/${DATA_HANDLER_COMPILED_NAME}"
COMMAND "${CMAKE_COMMAND}" -E copy_if_different "${CMAKE_CURRENT_SOURCE_DIR}/compiled/${DATA_HANDLER_COMPILED_NAME}" "${CMAKE_CURRENT_SOURCE_DIR}/python_package/brainflow/lib/${DATA_HANDLER_COMPILED_NAME}"
COMMAND "${CMAKE_COMMAND}" -E copy_if_different "${CMAKE_CURRENT_SOURCE_DIR}/compiled/${DATA_HANDLER_COMPILED_NAME}" "${CMAKE_CURRENT_SOURCE_DIR}/julia_package/brainflow/lib/${DATA_HANDLER_COMPILED_NAME}"
Expand Down
1 change: 1 addition & 0 deletions src/ml/build.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ endif (MSVC)
if (UNIX AND NOT ANDROID)
add_custom_command (TARGET ${ML_MODULE_NAME} POST_BUILD
COMMAND "${CMAKE_COMMAND}" -E copy_if_different "${CMAKE_CURRENT_SOURCE_DIR}/compiled/${ML_MODULE_COMPILED_NAME}" "${CMAKE_CURRENT_SOURCE_DIR}/nodejs_package/brainflow/lib/${ML_MODULE_COMPILED_NAME}"
COMMAND "${CMAKE_COMMAND}" -E copy_if_different "${CMAKE_CURRENT_SOURCE_DIR}/compiled/${ML_MODULE_COMPILED_NAME}" "${CMAKE_CURRENT_SOURCE_DIR}/swift_package/BrainFlow/lib/${ML_MODULE_COMPILED_NAME}"
COMMAND "${CMAKE_COMMAND}" -E copy_if_different "${CMAKE_CURRENT_SOURCE_DIR}/compiled/${ML_MODULE_COMPILED_NAME}" "${CMAKE_CURRENT_SOURCE_DIR}/python_package/brainflow/lib/${ML_MODULE_COMPILED_NAME}"
COMMAND "${CMAKE_COMMAND}" -E copy_if_different "${CMAKE_CURRENT_SOURCE_DIR}/compiled/${ML_MODULE_COMPILED_NAME}" "${CMAKE_CURRENT_SOURCE_DIR}/julia_package/brainflow/lib/${ML_MODULE_COMPILED_NAME}"
COMMAND "${CMAKE_COMMAND}" -E copy_if_different "${CMAKE_CURRENT_SOURCE_DIR}/compiled/${ML_MODULE_COMPILED_NAME}" "${CMAKE_CURRENT_SOURCE_DIR}/java_package/brainflow/src/main/resources/${ML_MODULE_COMPILED_NAME}"
Expand Down
3 changes: 2 additions & 1 deletion src/ml/onnx/build.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ endif (APPLE)

if (NOT ANDROID)
file (COPY ${ONNXRUNTIME_PATH} DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}/csharp_package/brainflow/brainflow/lib/)
file (COPY ${ONNXRUNTIME_PATH} DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}/swift_package/BrainFlow/lib/)
file (COPY ${ONNXRUNTIME_PATH} DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}/python_package/brainflow/lib/)
file (COPY ${ONNXRUNTIME_PATH} DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}/julia_package/brainflow/lib/)
file (COPY ${ONNXRUNTIME_PATH} DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}/java_package/brainflow/src/main/resources/)
Expand All @@ -39,4 +40,4 @@ install (
FILES
${ONNXRUNTIME_PATH}
DESTINATION lib
)
)
1 change: 1 addition & 0 deletions src/utils/bluetooth/build.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ if (MSVC)
endif (MSVC)
if (UNIX AND NOT ANDROID)
add_custom_command (TARGET ${BLUETOOTH_LIB_NAME} POST_BUILD
COMMAND "${CMAKE_COMMAND}" -E copy_if_different "${CMAKE_CURRENT_SOURCE_DIR}/compiled/${BLUETOOTH_LIB_COMPILED_NAME}" "${CMAKE_CURRENT_SOURCE_DIR}/swift_package/BrainFlow/lib/${BLUETOOTH_LIB_COMPILED_NAME}"
COMMAND "${CMAKE_COMMAND}" -E copy_if_different "${CMAKE_CURRENT_SOURCE_DIR}/compiled/${BLUETOOTH_LIB_COMPILED_NAME}" "${CMAKE_CURRENT_SOURCE_DIR}/python_package/brainflow/lib/${BLUETOOTH_LIB_COMPILED_NAME}"
COMMAND "${CMAKE_COMMAND}" -E copy_if_different "${CMAKE_CURRENT_SOURCE_DIR}/compiled/${BLUETOOTH_LIB_COMPILED_NAME}" "${CMAKE_CURRENT_SOURCE_DIR}/julia_package/brainflow/lib/${BLUETOOTH_LIB_COMPILED_NAME}"
COMMAND "${CMAKE_COMMAND}" -E copy_if_different "${CMAKE_CURRENT_SOURCE_DIR}/compiled/${BLUETOOTH_LIB_COMPILED_NAME}" "${CMAKE_CURRENT_SOURCE_DIR}/java_package/brainflow/src/main/resources/${BLUETOOTH_LIB_COMPILED_NAME}"
Expand Down
13 changes: 13 additions & 0 deletions swift_package/BrainFlow/BrainFlow.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//
// Created by Scott Miller on 4/9/22.
//

#ifndef BrainFlow_h
#define BrainFlow_h

#include "board_controller.h"
#include "data_handler.h"
#include "board_info_getter.h"
#include "ml_module.h"

#endif /* BrainFlow_h */
16 changes: 16 additions & 0 deletions swift_package/BrainFlow/Package.resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"object": {
"pins": [
{
"package": "swift-numerics",
"repositoryURL": "https://github.com/apple/swift-numerics.git",
"state": {
"branch": null,
"revision": "0a5bc04095a675662cf24757cc0640aa2204253b",
"version": "1.0.2"
}
}
]
},
"version": 1
}
33 changes: 33 additions & 0 deletions swift_package/BrainFlow/Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// swift-tools-version:5.3
import PackageDescription

let package = Package(
name: "BrainFlow",
platforms: [
.macOS(.v10_15), .iOS(.v13)
],
products: [
// Products define the executables and libraries a package produces, and make them visible to other packages.
.library(name: "BrainFlow",
targets: ["BrainFlow"])
],
dependencies: [
.package(name: "swift-numerics",
url: "https://github.com/apple/swift-numerics.git", .upToNextMajor(from: "1.0.0"))
],
targets: [
.target(
name: "BrainFlow",
dependencies: [.product(name: "Numerics", package: "swift-numerics")]
),
.testTarget(
name: "BrainFlowTests",
dependencies: ["BrainFlow", .product(name: "Numerics", package: "swift-numerics")],
sources: ["BoardShimTests.swift",
"BrainFlowCItests.swift",
"BrainFlowTests.swift",
"DataFilterTests.swift"]
)
]
)

4 changes: 4 additions & 0 deletions swift_package/BrainFlow/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# BrainFlow

Swift bindings for the BrainFlow C++ API. Contributed by Scott Miller for Aeris Rising, LLC.

Loading

0 comments on commit e2d0f24

Please sign in to comment.