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 Jan 29, 2021
1 parent b1c717f commit 1b87853
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions app/external/sp_midi/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ if(WIN32)
elseif(APPLE)
include_directories( ${PROJECT_SOURCE_DIR}/external_libs/spdlog-1.8.2/include ${PROJECT_SOURCE_DIR}/external_libs/concurrentqueue ${PROJECT_SOURCE_DIR}/external_libs)
else()
include_directories(${PROJECT_SOURCE_DIR}/external_libs/spdlog-1.8.2/include ${PROJECT_SOURCE_DIR}/external_libs/concurrentqueue)
include_directories(${PROJECT_SOURCE_DIR}/external_libs/spdlog-1.8.2/include ${PROJECT_SOURCE_DIR}/external_libs/concurrentqueue ${PROJECT_SOURCE_DIR}/external_libs)
endif()

set(sp_midi_sources
Expand All @@ -43,17 +43,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)

# sp_midi_sources
add_library(libsp_midi SHARED ${sp_midi_sources})
Expand Down Expand Up @@ -82,6 +81,6 @@ elseif(APPLE)
elseif(UNIX)
add_definitions(-DLINUX=1 -DNDEBUG=1)
include_directories(${ERLANG_INCLUDE_PATH})
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 1b87853

Please sign in to comment.