Skip to content

Commit

Permalink
Use built-in RtMidi on Linux too
Browse files Browse the repository at this point in the history
  • Loading branch information
hfiguiere committed Nov 7, 2020
1 parent d262e30 commit 38927a1
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions app/gui/qt/external/sp_midi/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,16 @@ set(sp_midi_sources
src/midicommon.cpp
src/midisendprocessor.cpp
src/utils.cpp
${PROJECT_SOURCE_DIR}/external_libs/rtmidi/RtMidi.cpp
)

if(MSVC)
list(APPEND sp_midi_sources ${PROJECT_SOURCE_DIR}/external_libs/rtmidi/RtMidi.cpp)
add_definitions(-D__WINDOWS_MM__)
endif(MSVC)

if(APPLE)
list(APPEND sp_midi_sources ${PROJECT_SOURCE_DIR}/external_libs/rtmidi/RtMidi.cpp)
elseif(APPLE)
add_definitions(-D__MACOSX_CORE__)
endif(APPLE)
elseif(UNIX)
add_definitions(-D__LINUX_ALSA__)
endif(MSVC)

if(APPLE)
set(juce_sources
Expand Down Expand Up @@ -87,6 +86,6 @@ elseif(APPLE)
target_link_libraries(libsp_midi "-framework CoreMIDI -framework CoreAudio -framework CoreFoundation -framework Accelerate -framework QuartzCore -framework AudioToolbox -framework IOKit -framework DiscRecording -framework Cocoa")
elseif(UNIX)
add_definitions(-DLINUX=1 -DNDEBUG=1 -DJUCER_LINUX_MAKE_6D53C8B4=1 -DJUCE_APP_VERSION=1.0.0 -DJUCE_APP_VERSION_HEX=0x10000)
target_link_libraries(libsp_midi pthread ${ALSA_LIBRARY} dl rtmidi)
target_link_libraries(libsp_midi pthread ${ALSA_LIBRARY} dl)
endif(MSVC)

0 comments on commit 38927a1

Please sign in to comment.