Skip to content

Commit 741ba1d

Browse files
committed
Merge commit 'e16f99a7d76355a08a56840e461520f76e7f51e1' as 'app/external/sp_link'
2 parents 7180752 + e16f99a commit 741ba1d

File tree

1,677 files changed

+488592
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,677 files changed

+488592
-0
lines changed
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: CMake
2+
3+
on: [push, pull_request, workflow_dispatch]
4+
5+
env:
6+
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
7+
BUILD_TYPE: Release
8+
9+
jobs:
10+
build:
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
os: [ubuntu-latest, macos-latest, windows-latest]
15+
runs-on: ${{ matrix.os }}
16+
17+
# The CMake configure and build commands are platform agnostic and should work equally
18+
# well on Windows or Mac. You can convert this to a matrix build if you need
19+
# cross-platform coverage.
20+
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
21+
22+
steps:
23+
- uses: actions/checkout@v2
24+
25+
- name: Fetch packages (Linux)
26+
if: runner.os == 'Linux'
27+
run: |
28+
sudo apt-get update
29+
sudo apt-get install erlang-dev
30+
31+
- name: Fetch packages (Mac)
32+
continue-on-error: true
33+
if: runner.os == 'macOS'
34+
run: |
35+
export HOMEBREW_NO_INSTALL_CLEANUP=1
36+
brew update
37+
brew install erlang
38+
39+
- name: Fetch packages (Windows)
40+
if: runner.os == 'Windows'
41+
run: choco install erlang
42+
43+
# - name: Setup tmate session
44+
# if: runner.os == 'Windows'
45+
# uses: mxschmitt/action-tmate@v3
46+
# timeout-minutes: 15
47+
48+
- name: Create Build Environment
49+
# Some projects don't allow in-source building, so create a separate build directory
50+
# We'll use this as our working directory for all subsequent commands
51+
run: cmake -E make_directory ${{github.workspace}}/build
52+
53+
- name: Configure CMake
54+
# Use a bash shell so we can use the same syntax for environment variable
55+
# access regardless of the host operating system
56+
shell: bash
57+
working-directory: ${{github.workspace}}/build
58+
# Note the current convention is to use the -S and -B options here to specify source
59+
# and build directories, but this is only available with CMake 3.13 and higher.
60+
# The CMake binaries on the Github Actions machines are (as of this writing) 3.12
61+
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE
62+
63+
- name: Build
64+
working-directory: ${{github.workspace}}/build
65+
shell: bash
66+
# Execute the build. You can specify a specific target with "--target <NAME>"
67+
run: cmake --build . --config $BUILD_TYPE

app/external/sp_link/.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
*.o
2+
*~
3+
build/
4+
.vscode/
5+
*.beam
6+
.vs/
7+
*.bak
8+
.#*

app/external/sp_link/CMakeLists.txt

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
project (sp_link)
2+
cmake_minimum_required (VERSION 3.0)
3+
4+
set(CMAKE_VERBOSE_MAKEFILE ON)
5+
6+
if(NOT MSVC)
7+
if(APPLE)
8+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -stdlib=libc++")
9+
else(APPLE)
10+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")
11+
endif(APPLE)
12+
endif(NOT MSVC)
13+
14+
15+
# If we need to change something based on this running on CI, we can use if(DEFINED ENV{GITHUB_ACTION})
16+
if(APPLE)
17+
set(ERLANG_INCLUDE_PATH "/usr/local/lib/erlang/usr/include" CACHE PATH "Path to erlang includes")
18+
elseif(MSVC)
19+
if(DEFINED ENV{GITHUB_ACTION})
20+
set(ERLANG_INCLUDE_PATH "C:/Program Files/erl10.7/usr/include" CACHE PATH "Path to erlang includes")
21+
else()
22+
set(ERLANG_INCLUDE_PATH "C:/Program Files/erl-23.0/usr/include" CACHE PATH "Path to erlang includes")
23+
endif()
24+
endif(APPLE)
25+
26+
27+
# For Link
28+
include(${PROJECT_SOURCE_DIR}/external_libs/link/AbletonLinkConfig.cmake)
29+
#target_link_libraries(libsp_link Ableton::Link)
30+
31+
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
32+
33+
if(WIN32)
34+
include_directories(${PROJECT_SOURCE_DIR}/external_libs/spdlog-1.8.2/include)
35+
elseif(APPLE)
36+
include_directories(${PROJECT_SOURCE_DIR}/external_libs/spdlog-1.8.2/include)
37+
else()
38+
include_directories(${PROJECT_SOURCE_DIR}/external_libs/spdlog-1.8.2/include)
39+
endif()
40+
41+
set(sp_link_sources
42+
src/sp_link.cpp
43+
src/sp_link_nifs.cpp
44+
src/sp_link_nif_callbacks.cpp
45+
)
46+
47+
# sp_link_sources
48+
add_library(libsp_link SHARED ${sp_link_sources})
49+
SET_TARGET_PROPERTIES(libsp_link PROPERTIES PREFIX "")
50+
51+
#check if armv7l architecture (Raspberry Pi OS 32bit) and add atomic linking if so
52+
#if (${CMAKE_HOST_SYSTEM_PROCESSOR} MATCHES "armv7l")
53+
# message(STATUS("linking atomic for armv7l architecture"))
54+
# target_link_libraries(libsp_link atomic)
55+
#endif()
56+
57+
if(MSVC)
58+
add_definitions(-D_WIN32_WINNT=0x0600)
59+
include_directories(${ERLANG_INCLUDE_PATH})
60+
target_link_libraries(libsp_link Ableton::Link)
61+
# example test exe. Only under Windows, because on the others, the NIF functions are resolved when linked to the erlang VM, not on the library
62+
add_executable(sp_link_test src/sp_link_test.c)
63+
target_link_libraries(sp_link_test libsp_link)
64+
elseif(APPLE)
65+
add_definitions(-DNDEBUG=1)
66+
include_directories(${ERLANG_INCLUDE_PATH})
67+
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -undefined suppress -flat_namespace")
68+
set_target_properties(libsp_link PROPERTIES XCODE_ATTRIBUTE_CLANG_LINK_OBJC_RUNTIME "NO")
69+
# set(CMAKE_EXE_LINKER_FLAGS "-framework CoreMIDI -framework CoreAudio -framework CoreFoundation -framework Accelerate -framework QuartzCore -framework AudioToolbox -framework IOKit -framework DiscRecording -framework Cocoa")
70+
target_link_libraries(libsp_link Ableton::Link "-framework CoreMIDI -framework CoreAudio -framework CoreFoundation -framework Accelerate -framework QuartzCore -framework AudioToolbox -framework IOKit -framework DiscRecording -framework Cocoa")
71+
elseif(UNIX)
72+
add_definitions(-DLINUX=1 -DNDEBUG=1)
73+
target_link_libraries(libsp_link Ableton::Link)
74+
endif(MSVC)
75+

app/external/sp_link/LICENSE.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
sp_link uses link and spdlog. Please see the licenses in the respective "external_libs" directories
2+
3+
-------------------------------------------------------------------------------
4+
For sp_link itself:
5+
6+
MIT License
7+
8+
Copyright (c) 2021 Luis Lloret
9+
10+
Permission is hereby granted, free of charge, to any person obtaining a copy
11+
of this software and associated documentation files (the "Software"), to deal
12+
in the Software without restriction, including without limitation the rights
13+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14+
copies of the Software, and to permit persons to whom the Software is
15+
furnished to do so, subject to the following conditions:
16+
The above copyright notice and this permission notice shall be included in all
17+
copies or substantial portions of the Software.
18+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24+
SOFTWARE.
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
clone_depth: 50
2+
3+
branches:
4+
only:
5+
- master
6+
7+
# Also includes VS2013 pre-installed
8+
image:
9+
- Visual Studio 2015
10+
- Visual Studio 2017
11+
- Visual Studio 2019
12+
13+
environment:
14+
matrix:
15+
# Visual Studio 2013, 32-bit Release, Asio driver
16+
- AUDIO_DRIVER: Asio
17+
CONFIGURATION: Release
18+
GENERATOR: Visual Studio 12 2013
19+
# Visual Studio 2013, 64-bit Release, Asio driver
20+
- AUDIO_DRIVER: Asio
21+
CONFIGURATION: Release
22+
GENERATOR: Visual Studio 12 2013 Win64
23+
# Visual Studio 2013, 64-bit Debug, Wasapi driver
24+
- AUDIO_DRIVER: Wasapi
25+
CONFIGURATION: Debug
26+
GENERATOR: Visual Studio 12 2013 Win64
27+
# Visual Studio 2015, 32-bit Release, Asio driver
28+
- AUDIO_DRIVER: Asio
29+
CONFIGURATION: Release
30+
GENERATOR: Visual Studio 14 2015
31+
# Visual Studio 2015, 64-bit Debug, Asio driver
32+
- AUDIO_DRIVER: Asio
33+
CONFIGURATION: Debug
34+
GENERATOR: Visual Studio 14 2015 Win64
35+
# Visual Studio 2015, 64-bit Release, Asio driver
36+
- AUDIO_DRIVER: Asio
37+
CONFIGURATION: Release
38+
GENERATOR: Visual Studio 14 2015 Win64
39+
# Visual Studio 2015, 64-bit Release, Wasapi driver
40+
- AUDIO_DRIVER: Wasapi
41+
CONFIGURATION: Release
42+
GENERATOR: Visual Studio 14 2015 Win64
43+
# Visual Studio 2017, 64-bit Release, Asio driver
44+
- AUDIO_DRIVER: Asio
45+
CONFIGURATION: Release
46+
GENERATOR: Visual Studio 15 2017 Win64
47+
# Visual Studio 2019, 64-bit Release, Asio driver
48+
- AUDIO_DRIVER: Asio
49+
CONFIGURATION: Release
50+
GENERATOR: Visual Studio 16 2019
51+
52+
matrix:
53+
exclude:
54+
- image: Visual Studio 2015
55+
GENERATOR: Visual Studio 15 2017 Win64
56+
- image: Visual Studio 2015
57+
GENERATOR: Visual Studio 16 2019
58+
- image: Visual Studio 2017
59+
GENERATOR: Visual Studio 12 2013
60+
- image: Visual Studio 2017
61+
GENERATOR: Visual Studio 12 2013 Win64
62+
- image: Visual Studio 2017
63+
GENERATOR: Visual Studio 14 2015
64+
- image: Visual Studio 2017
65+
GENERATOR: Visual Studio 14 2015 Win64
66+
- image: Visual Studio 2017
67+
GENERATOR: Visual Studio 16 2019
68+
- image: Visual Studio 2019
69+
GENERATOR: Visual Studio 12 2013
70+
- image: Visual Studio 2019
71+
GENERATOR: Visual Studio 12 2013 Win64
72+
- image: Visual Studio 2019
73+
GENERATOR: Visual Studio 14 2015
74+
- image: Visual Studio 2019
75+
GENERATOR: Visual Studio 14 2015 Win64
76+
- image: Visual Studio 2019
77+
GENERATOR: Visual Studio 15 2017
78+
- image: Visual Studio 2019
79+
GENERATOR: Visual Studio 15 2017 Win64
80+
81+
install:
82+
- git submodule update --init --recursive
83+
84+
build_script:
85+
- python ci/configure.py -a %AUDIO_DRIVER% -g "%GENERATOR%"
86+
- python ci/build.py --configuration %CONFIGURATION%
87+
88+
test_script:
89+
- python ci/run-tests.py --target LinkCoreTest
90+
- python ci/run-tests.py --target LinkDiscoveryTest
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
Language: Cpp
2+
3+
AccessModifierOffset: -2
4+
AlignAfterOpenBracket: DontAlign
5+
AlignEscapedNewlinesLeft: false
6+
AlignOperands: true
7+
AlignTrailingComments: true
8+
AllowAllParametersOfDeclarationOnNextLine: true
9+
AllowShortBlocksOnASingleLine: false
10+
AllowShortCaseLabelsOnASingleLine: false
11+
AllowShortFunctionsOnASingleLine: None
12+
AllowShortIfStatementsOnASingleLine: false
13+
AllowShortLoopsOnASingleLine: false
14+
AlwaysBreakAfterDefinitionReturnType: None
15+
AlwaysBreakAfterReturnType: None
16+
AlwaysBreakBeforeMultilineStrings: true
17+
AlwaysBreakTemplateDeclarations: true
18+
BinPackArguments: true
19+
BinPackParameters: false
20+
BreakBeforeBinaryOperators: NonAssignment
21+
BreakBeforeBraces: Allman
22+
BreakBeforeTernaryOperators: true
23+
BreakConstructorInitializersBeforeComma: true
24+
ColumnLimit: 90
25+
ConstructorInitializerAllOnOneLineOrOnePerLine: false
26+
ConstructorInitializerIndentWidth: 2
27+
ContinuationIndentWidth: 2
28+
Cpp11BracedListStyle: true
29+
DerivePointerAlignment: false
30+
IndentCaseLabels: false
31+
IndentFunctionDeclarationAfterType: false
32+
IndentWidth: 2
33+
IndentWrappedFunctionNames: false
34+
KeepEmptyLinesAtTheStartOfBlocks: true
35+
MaxEmptyLinesToKeep: 2
36+
NamespaceIndentation: None
37+
PenaltyBreakBeforeFirstCallParameter: 0
38+
PenaltyReturnTypeOnItsOwnLine: 1000
39+
PointerAlignment: Left
40+
SpaceAfterCStyleCast: false
41+
SpaceBeforeAssignmentOperators: true
42+
SpaceBeforeParens: ControlStatements
43+
SpaceInEmptyParentheses: false
44+
SpacesBeforeTrailingComments: 1
45+
SpacesInAngles: false
46+
SpacesInCStyleCastParentheses: false
47+
SpacesInParentheses: false
48+
SpacesInSquareBrackets: false
49+
Standard: Cpp11
50+
UseTab: Never
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# IDE generated files and build outputs
2+
/build/
3+
/ide/
4+
/output/
5+
/logs/
6+
.idea/*
7+
8+
# System temporary files
9+
.DS_Store
10+
*~
11+
*.swp
12+
13+
# Compiled Object files
14+
*.slo
15+
*.lo
16+
*.o
17+
*.obj
18+
19+
# Compiled Dynamic libraries
20+
*.so
21+
*.dylib
22+
*.dll
23+
24+
# Compiled Static libraries
25+
*.lai
26+
*.la
27+
*.a
28+
*.lib
29+
30+
# Executables
31+
*.exe
32+
*.out
33+
*.app
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "modules/asio-standalone"]
2+
path = modules/asio-standalone
3+
url = https://github.com/chriskohlhoff/asio.git

0 commit comments

Comments
 (0)