Skip to content

Commit c3ae7fa

Browse files
committed
External - update sp-midi to 0f0afc2
This removes a dependency on JUCE and enables multiple simultaneous and identical controllers to be used on macOS
1 parent 3f8fc39 commit c3ae7fa

File tree

2,612 files changed

+388802
-192081
lines changed

Some content is hidden

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

2,612 files changed

+388802
-192081
lines changed

app/external/sp_midi/CMakeLists.txt

Lines changed: 16 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -11,26 +11,29 @@ if(NOT MSVC)
1111
endif(APPLE)
1212
endif(NOT MSVC)
1313

14+
15+
# If we need to change something based on this running on CI, we can use if(DEFINED ENV{GITHUB_ACTION})
1416
if(APPLE)
1517
set(ERLANG_INCLUDE_PATH "/usr/local/lib/erlang/usr/include" CACHE PATH "Path to erlang includes")
1618
elseif(UNIX)
1719
set(ERLANG_INCLUDE_PATH "/usr/lib/erlang/usr/include" CACHE PATH "Path to erlang includes")
1820
find_package(ALSA REQUIRED)
1921
elseif(MSVC)
20-
set(ERLANG_INCLUDE_PATH "C:/Program Files/erl-23.0/usr/include" CACHE PATH "Path to erlang includes")
22+
if(DEFINED ENV{GITHUB_ACTION})
23+
set(ERLANG_INCLUDE_PATH "C:/Program Files/erl10.7/usr/include" CACHE PATH "Path to erlang includes")
24+
else()
25+
set(ERLANG_INCLUDE_PATH "C:/Program Files/erl-23.0/usr/include" CACHE PATH "Path to erlang includes")
26+
endif()
2127
endif(APPLE)
2228

2329
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
2430

25-
#set(oscpack_path ${PROJECT_SOURCE_DIR}/external_libs/oscpack_1_1_0)
26-
#add_subdirectory(${oscpack_path})
27-
2831
if(WIN32)
29-
include_directories( ${PROJECT_SOURCE_DIR}/external_libs/spdlog-0.11.0/include JuceLibraryCode JuceLibraryCode/modules ${PROJECT_SOURCE_DIR}/external_libs/cxxopts ${PROJECT_SOURCE_DIR}/external_libs)
32+
include_directories( ${PROJECT_SOURCE_DIR}/external_libs/spdlog-1.8.2/include ${PROJECT_SOURCE_DIR}/external_libs/concurrentqueue ${PROJECT_SOURCE_DIR}/external_libs)
3033
elseif(APPLE)
31-
include_directories( ${PROJECT_SOURCE_DIR}/external_libs/spdlog-0.11.0/include JuceLibraryCode JuceLibraryCode/modules ${PROJECT_SOURCE_DIR}/external_libs/cxxopts ${PROJECT_SOURCE_DIR}/external_libs)
34+
include_directories( ${PROJECT_SOURCE_DIR}/external_libs/spdlog-1.8.2/include ${PROJECT_SOURCE_DIR}/external_libs/concurrentqueue ${PROJECT_SOURCE_DIR}/external_libs)
3235
else()
33-
include_directories(${PROJECT_SOURCE_DIR}/external_libs/spdlog-0.11.0/include JuceLibraryCode JuceLibraryCode/modules ${PROJECT_SOURCE_DIR}/external_libs/cxxopts)
36+
include_directories(${PROJECT_SOURCE_DIR}/external_libs/spdlog-1.8.2/include ${PROJECT_SOURCE_DIR}/external_libs/concurrentqueue)
3437
endif()
3538

3639
set(sp_midi_sources
@@ -52,20 +55,8 @@ if(APPLE)
5255
add_definitions(-D__MACOSX_CORE__)
5356
endif(APPLE)
5457

55-
if(APPLE)
56-
set(juce_sources
57-
JuceLibraryCode/include_juce_core.mm
58-
JuceLibraryCode/include_juce_events.mm
59-
)
60-
else(APPLE)
61-
set(juce_sources
62-
JuceLibraryCode/include_juce_core.cpp
63-
JuceLibraryCode/include_juce_events.cpp
64-
)
65-
endif(APPLE)
66-
6758
# sp_midi_sources
68-
add_library(libsp_midi SHARED ${sp_midi_sources} ${juce_sources})
59+
add_library(libsp_midi SHARED ${sp_midi_sources})
6960
SET_TARGET_PROPERTIES(libsp_midi PROPERTIES PREFIX "")
7061

7162
#check if armv7l architecture (Raspberry Pi OS 32bit) and add atomic linking if so
@@ -74,25 +65,23 @@ if (${CMAKE_HOST_SYSTEM_PROCESSOR} MATCHES "armv7l")
7465
target_link_libraries(libsp_midi atomic)
7566
endif()
7667

77-
add_definitions(-DJUCE_ALSA_MIDI_NAME="sp_midi")
78-
add_definitions(-DJUCE_APP_CONFIG_HEADER="AppConfig.h")
79-
8068
if(MSVC)
81-
add_definitions(-D_WIN32_WINNT=0x0600 -DJUCER_VS2015_78A5022=1 -DJUCE_APP_VERSION=1.0.0 -DJUCE_APP_VERSION_HEX=0x10000)
69+
add_definitions(-D_WIN32_WINNT=0x0600)
8270
include_directories(${ERLANG_INCLUDE_PATH})
8371
target_link_libraries(libsp_midi winmm)
84-
# example test exe. Only under Windows, because on the others, the NIF functions are resolved when linked to the erlnag VM, not on the library
72+
# 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
8573
add_executable(sp_midi_test src/sp_midi_test.c)
8674
target_link_libraries(sp_midi_test libsp_midi)
8775
elseif(APPLE)
88-
add_definitions(-DNDEBUG=1 -DJUCER_XCODE_MAC_F6D2F4CF=1 -DJUCE_APP_VERSION=1.0.0 -DJUCE_APP_VERSION_HEX=0x10000)
76+
add_definitions(-DNDEBUG=1)
8977
include_directories(${ERLANG_INCLUDE_PATH})
9078
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -undefined suppress -flat_namespace")
9179
set_target_properties(libsp_midi PROPERTIES XCODE_ATTRIBUTE_CLANG_LINK_OBJC_RUNTIME "NO")
9280
# set(CMAKE_EXE_LINKER_FLAGS "-framework CoreMIDI -framework CoreAudio -framework CoreFoundation -framework Accelerate -framework QuartzCore -framework AudioToolbox -framework IOKit -framework DiscRecording -framework Cocoa")
9381
target_link_libraries(libsp_midi "-framework CoreMIDI -framework CoreAudio -framework CoreFoundation -framework Accelerate -framework QuartzCore -framework AudioToolbox -framework IOKit -framework DiscRecording -framework Cocoa")
9482
elseif(UNIX)
95-
add_definitions(-DLINUX=1 -DNDEBUG=1 -DJUCER_LINUX_MAKE_6D53C8B4=1 -DJUCE_APP_VERSION=1.0.0 -DJUCE_APP_VERSION_HEX=0x10000)
83+
add_definitions(-DLINUX=1 -DNDEBUG=1)
9684
include_directories(${ERLANG_INCLUDE_PATH})
9785
target_link_libraries(libsp_midi pthread ${ALSA_LIBRARY} dl rtmidi)
9886
endif(MSVC)
87+

app/external/sp_midi/INSTALL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Don't know yet...
1919
* go to the root directory where you have the sp_midi sources (probably where this file is)
2020
* create `build` directory, and get into it (`mkdir build`, and then `cd build`)
2121
* It is normally enough to do `cmake ..`. If cmake complains about not finding a library make sure that it is installed.
22-
* On Linux, if cmake was succesful then it created the necessary Makefiles. Do `make`, and that will compile the code and create the binaries.
22+
* On Linux, if cmake was successful then it created the necessary Makefiles. Do `make`, and that will compile the code and create the binaries.
2323
* On Windows, if cmake was successful then it created the necessary Visual Studio solution and Project files. Open the `sp_midi.sln` file, and Build normally to create the binaries.
2424

2525

app/external/sp_midi/JuceLibraryCode/AppConfig.h

Lines changed: 0 additions & 158 deletions
This file was deleted.

app/external/sp_midi/JuceLibraryCode/JuceHeader.h

Lines changed: 0 additions & 40 deletions
This file was deleted.

app/external/sp_midi/JuceLibraryCode/ReadMe.txt

Lines changed: 0 additions & 12 deletions
This file was deleted.

app/external/sp_midi/JuceLibraryCode/include_juce_audio_basics.cpp

Lines changed: 0 additions & 8 deletions
This file was deleted.

app/external/sp_midi/JuceLibraryCode/include_juce_audio_basics.mm

Lines changed: 0 additions & 8 deletions
This file was deleted.

app/external/sp_midi/JuceLibraryCode/include_juce_audio_devices.cpp

Lines changed: 0 additions & 8 deletions
This file was deleted.

app/external/sp_midi/JuceLibraryCode/include_juce_audio_devices.mm

Lines changed: 0 additions & 8 deletions
This file was deleted.

app/external/sp_midi/JuceLibraryCode/include_juce_core.cpp

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)