Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swift bindings #716

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
e2d0f24
Swift Bindings with updated cmake files and standalone executable CI …
ScottThomasMiller Apr 18, 2024
00ab3b3
trying to fix build error from SPM
ScottThomasMiller Apr 18, 2024
d376386
removed Package.resolved and xcode clean commands
ScottThomasMiller Apr 18, 2024
6f751b3
removed BrainFlowCITests.swift from all targets
ScottThomasMiller Apr 18, 2024
b81e571
removed all references to BrainFlowTests
ScottThomasMiller Apr 18, 2024
ec5faa5
set exact version of swift-argument-parser
ScottThomasMiller Apr 19, 2024
c9e699b
set exact version of swift-argument-parser to 1.2.0
ScottThomasMiller Apr 19, 2024
1f25c6a
using destination OS X
ScottThomasMiller Apr 19, 2024
0e47557
platform=macOS, arch=x86_64
ScottThomasMiller Apr 19, 2024
26bd97e
removed space from destination parameter
ScottThomasMiller Apr 19, 2024
19960d4
removed code signing
ScottThomasMiller Apr 19, 2024
d94cce8
added Frameworks directory and updated gitignore
ScottThomasMiller Apr 19, 2024
6bdb626
added cp commands for the Frameworks subdirectory
ScottThomasMiller Apr 19, 2024
f255cf2
added arm64 and updated simpleble make file
ScottThomasMiller Apr 19, 2024
cd2921a
removed arm64 destination
ScottThomasMiller Apr 19, 2024
ab3ed47
using xcodebuild install
ScottThomasMiller Apr 20, 2024
dfbade1
embed without signing and copy-on-install
ScottThomasMiller Apr 20, 2024
4e646ad
pared-down yml for expedited troubleshooting
ScottThomasMiller Apr 20, 2024
41371de
added troubleshooting ls and otool commands
ScottThomasMiller Apr 20, 2024
25002c3
added troubleshooting ls and otool commands take II
ScottThomasMiller Apr 20, 2024
e29e21a
unchecked copy on install
ScottThomasMiller Apr 20, 2024
7c1a543
troubleshooting image not found error
ScottThomasMiller Apr 20, 2024
192b959
added runpath search paths
ScottThomasMiller Apr 20, 2024
a3d1137
changed embedding location to executables
ScottThomasMiller Apr 20, 2024
950fe6f
commented out ls commands
ScottThomasMiller Apr 20, 2024
b350a25
add ls install
ScottThomasMiller Apr 20, 2024
9caaefb
disabled library validation
ScottThomasMiller Apr 20, 2024
56884af
disable library validation for all
ScottThomasMiller Apr 20, 2024
7b46896
re-added build commands
ScottThomasMiller Apr 20, 2024
3f05e05
reverted run unix to confirm all other CI is OK
ScottThomasMiller Apr 21, 2024
fbaaa7c
really reverted it this time
ScottThomasMiller Apr 21, 2024
a2c526a
known good Swift CI
ScottThomasMiller Apr 21, 2024
9982ba8
cleanup for initial PR
ScottThomasMiller May 3, 2024
322c29c
Merge branch 'master' into swift-bindings
Andrey1994 May 12, 2024
ba868be
finished cleanup
ScottThomasMiller May 12, 2024
42ceaf4
PR cleanup third pass
ScottThomasMiller May 13, 2024
8d8050f
fixed linker error
ScottThomasMiller May 14, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
101 changes: 100 additions & 1 deletion .github/workflows/run_unix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,109 @@ 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
if: (matrix.os == 'macos-11.0')
run: |
cd $GITHUB_WORKSPACE/swift_package/BrainFlowCI
xcodebuild install -project BrainFlowCI.xcodeproj -destination 'platform=macOS,arch=x86_64' DSTROOT=. INSTALL_PATH=install -scheme band_power
- name: build band_power_all Swift
if: (matrix.os == 'macos-11.0')
run: |
cd $GITHUB_WORKSPACE/swift_package/BrainFlowCI
xcodebuild install -project BrainFlowCI.xcodeproj -destination 'platform=macOS,arch=x86_64' DSTROOT=. INSTALL_PATH=install -scheme band_power_all
- name: build brainflow_get_data Swift
if: (matrix.os == 'macos-11.0')
run: |
cd $GITHUB_WORKSPACE/swift_package/BrainFlowCI
xcodebuild install -project BrainFlowCI.xcodeproj -destination 'platform=macOS,arch=x86_64' DSTROOT=. INSTALL_PATH=install -scheme brainflow_get_data
- name: build denoising Swift
if: (matrix.os == 'macos-11.0')
run: |
cd $GITHUB_WORKSPACE/swift_package/BrainFlowCI
xcodebuild install -project BrainFlowCI.xcodeproj -destination 'platform=macOS,arch=x86_64' DSTROOT=. INSTALL_PATH=install -scheme denoising
- name: build downsampling Swift
if: (matrix.os == 'macos-11.0')
run: |
cd $GITHUB_WORKSPACE/swift_package/BrainFlowCI
xcodebuild install -project BrainFlowCI.xcodeproj -destination 'platform=macOS,arch=x86_64' DSTROOT=. INSTALL_PATH=install -scheme downsampling
- name: build eeg_metrics Swift
if: (matrix.os == 'macos-11.0')
run: |
cd $GITHUB_WORKSPACE/swift_package/BrainFlowCI
xcodebuild install -project BrainFlowCI.xcodeproj -destination 'platform=macOS,arch=x86_64' DSTROOT=. INSTALL_PATH=install -scheme eeg_metrics
- name: build ica Swift
if: (matrix.os == 'macos-11.0')
run: |
cd $GITHUB_WORKSPACE/swift_package/BrainFlowCI
xcodebuild install -project BrainFlowCI.xcodeproj -destination 'platform=macOS,arch=x86_64' DSTROOT=. INSTALL_PATH=install -scheme ica
- name: build markers Swift
if: (matrix.os == 'macos-11.0')
run: |
cd $GITHUB_WORKSPACE/swift_package/BrainFlowCI
xcodebuild install -project BrainFlowCI.xcodeproj -destination 'platform=macOS,arch=x86_64' DSTROOT=. INSTALL_PATH=install -scheme markers
- name: build read_write_file Swift
if: (matrix.os == 'macos-11.0')
run: |
cd $GITHUB_WORKSPACE/swift_package/BrainFlowCI
xcodebuild install -project BrainFlowCI.xcodeproj -destination 'platform=macOS,arch=x86_64' DSTROOT=. INSTALL_PATH=install -scheme read_write_file
- name: build signal_filtering Swift
if: (matrix.os == 'macos-11.0')
run: |
cd $GITHUB_WORKSPACE/swift_package/BrainFlowCI
xcodebuild install -project BrainFlowCI.xcodeproj -destination 'platform=macOS,arch=x86_64' DSTROOT=. INSTALL_PATH=install -scheme signal_filtering
- name: build transforms Swift
if: (matrix.os == 'macos-11.0')
run: |
cd $GITHUB_WORKSPACE/swift_package/BrainFlowCI
xcodebuild install -project BrainFlowCI.xcodeproj -destination 'platform=macOS,arch=x86_64' DSTROOT=. INSTALL_PATH=install -scheme transforms
# start testing
- name: Run unit tests
run: $GITHUB_WORKSPACE/build/tests/brainflow_tests
- name: band_power Swift
if: (matrix.os == 'macos-11.0')
run: |
$GITHUB_WORKSPACE/swift_package/BrainFlowCI/install/band_power
- name: band_power_all Swift
if: (matrix.os == 'macos-11.0')
run: |
$GITHUB_WORKSPACE/swift_package/BrainFlowCI/install/band_power_all
- name: brainflow_get_data Swift
if: (matrix.os == 'macos-11.0')
run: |
$GITHUB_WORKSPACE/swift_package/BrainFlowCI/install/brainflow_get_data
- name: denoising Swift
if: (matrix.os == 'macos-11.0')
run: |
$GITHUB_WORKSPACE/swift_package/BrainFlowCI/install/denoising
- name: downsampling Swift
if: (matrix.os == 'macos-11.0')
run: |
$GITHUB_WORKSPACE/swift_package/BrainFlowCI/install/downsampling
- name: eeg_metrics Swift
if: (matrix.os == 'macos-11.0')
run: |
$GITHUB_WORKSPACE/swift_package/BrainFlowCI/install/eeg_metrics
- name: ica Swift
if: (matrix.os == 'macos-11.0')
run: |
$GITHUB_WORKSPACE/swift_package/BrainFlowCI/install/ica
- name: markers Swift
if: (matrix.os == 'macos-11.0')
run: |
$GITHUB_WORKSPACE/swift_package/BrainFlowCI/install/markers
- name: read_write_file Swift
if: (matrix.os == 'macos-11.0')
run: |
$GITHUB_WORKSPACE/swift_package/BrainFlowCI/install/read_write_file
- name: signal_filtering Swift
if: (matrix.os == 'macos-11.0')
run: |
$GITHUB_WORKSPACE/swift_package/BrainFlowCI/install/signal_filtering
- name: transforms Swift
if: (matrix.os == 'macos-11.0')
run: |
$GITHUB_WORKSPACE/swift_package/BrainFlowCI/install/transforms
- name: Synthetic C# Test MacOS
if: (matrix.os == 'macos-11.0')
run: |
Expand Down
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
*.dylib
35 changes: 34 additions & 1 deletion docs/BuildBrainFlow.rst
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,40 @@ Rust
Swift
-------

You can build Swift binding for BrainFlow using xcode. Before that you need to compile C/C++ code :ref:`compilation-label` and ensure that native libraries are properly placed. Keep in mind that currently it supports only MacOS.
You can build the Swift bindings for BrainFlow using Xcode. Before that you need to compile C/C++ code :ref:`compilation-label` and ensure that native libraries are properly placed. Keep in mind that currently it supports only MacOS.

To compile your Swift app with the BrainFlow bindings, first copy all of the .swift files from swift_package/BrainFlow/Sources/BrainFlowBindings into your Xcode project:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

copypasting files is not good, I actually thought that its smth like package. e.g. https://www.swiftyplace.com/blog/modular-code-with-swift-package-manager
Can also publish it on github packages later on. BrainFlowCI should use it as a package also

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Creating the package is an important feature, but it is also a challenge and will take a while. I've tried several times over the years but failed each time. I will most likely have to open a help ticket with Apple Developer Support. I cannot promise a delivery date for this feature.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://developer.apple.com/documentation/xcode/creating-a-standalone-swift-package-with-xcode here is a good guide how to create it, I believe the 1st step should be to separate BrainFlowCI and BrainFlowBinding to different projects, create a package like described in the article and after that try to use this package in CI apps


- Right click on your project in the Project Navigator window, and then select "Add Files to ...".
- A file dialog will open in Xcode. In the file dialog select the swift_package/BrainFlow/Sources/BrainFlowBindings folder. Make sure the "Copy items if needed" box is checked, as well as the box next to your target in the "Add to targets" section.
- Click the Add button.

Next add the umbrella header file to your project and configure the project settings so that Xcode can find the BrainFlow headers:

- In the project navigator right click on the BrainFlowBindings folder and select "Add Files to BrainFlowBindings".
In the file dialog select the swift_package/BrainFlow/BrainFlow.h file.
- Click the Add button.
- Click on your project in the project navigator.
- Click on your target in the target list.
- Select "Build Settings" and then search for the word "bridging".
- Open the "Objective-C Bridging Header" setting and add the value "${PROJECT_DIR}/BrainFlowBindings/BrainFlow.h".
- Search for the "Header Search Paths" setting.
- Open the "Header Search Paths" setting. Click the + button and then enter the full path to the brainflow/src directory. You may use an absolute or a relative path.
- To the right of the header search path entry select "recursive".

Next add the BrainFlow dylibs to your project:

- From the Finder, drag and drop the dylibs into your Xcode project, under the "Frameworks" group.
- A dialog will open in Xcode. Make sure the "Copy items if needed" box is checked, and check the box next to your target in the "Add to targets" section of the dialog.
- Click the "Finish" button.
- Click on your project in the project navigator.
- Click on your target in the target list.
- Select "General" and then scroll down to the "Frameworks, Libraries and Embedded Content" section.
- Make sure "Embed & Sign" or "Embed Without Signing" is selected for each of the added dylibs.

Finally, before you build, clean the build folder by clicking on the "Product" menu and selecting "Clean Build Folder...".

Enjoy!

Docker Image
--------------
Expand Down
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
4 changes: 2 additions & 2 deletions src/board_controller/muse/muse_bglib/build.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +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}/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}/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}/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}"
COMMAND "${CMAKE_COMMAND}" -E copy_if_different "${CMAKE_CURRENT_SOURCE_DIR}/compiled/${MUSE_BLED_LIB_NAME}" "${CMAKE_CURRENT_SOURCE_DIR}/csharp_package/brainflow/brainflow/${MUSE_BLED_LIB_NAME}"
Expand All @@ -78,4 +78,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
Loading
Loading