Skip to content
Permalink
Browse files
Fixed build with disabled ADLMIDI, OPNMIDI, and Timidity
  • Loading branch information
Wohlstand committed Jan 9, 2019
1 parent 3e21776 commit d169c400e04aeb892181af923191de593a9b229d
Showing 1 changed file with 21 additions and 7 deletions.
@@ -473,15 +473,15 @@ if(USE_MIDI)
endif()
set(LIBMATH_NEEDED 1)
list(APPEND SDLMixerX_LINK_LIBS ${LIBADLMIDI_LIB})
list(APPEND SDLMixerX_SOURCES
${SDLMixerX_SOURCE_DIR}/src/codecs/music_midi_adl.c)
endif()
endif()
# Keep in build list even not used (to link necessary calls)
list(APPEND SDLMixerX_SOURCES ${SDLMixerX_SOURCE_DIR}/src/codecs/music_midi_adl.c)

option(USE_MIDI_OPNMIDI "Build with libOPNMIDI OPN2 Emulator based MIDI sequencer support" ON)
if(USE_MIDI_OPNMIDI)
if(USE_SYSTEM_AUDIO_LIBRARIES)
check_library_exists(OPNMIDI opn_init "opnmidi.h" FOUND_OPNMIDI)
check_library_exists(OPNMIDI opn2_init "opnmidi.h" FOUND_OPNMIDI)
find_path(LIBOPNMIDI_INCLUDE_DIR "opnmidi.h")
find_library(LIBOPNMIDI_LIB NAMES OPNMIDI)
message("OPNMIDI: ${LIBOPNMIDI_INCLUDE_DIR} ${LIBOPNMIDI_LIB}")
@@ -502,10 +502,10 @@ if(USE_MIDI)
endif()
set(LIBMATH_NEEDED 1)
list(APPEND SDLMixerX_LINK_LIBS ${LIBOPNMIDI_LIB})
list(APPEND SDLMixerX_SOURCES
${SDLMixerX_SOURCE_DIR}/src/codecs/music_midi_opn.c)
endif()
endif()
# Keep in build list even not used (to link necessary calls)
list(APPEND SDLMixerX_SOURCES ${SDLMixerX_SOURCE_DIR}/src/codecs/music_midi_opn.c)

option(USE_MIDI_TIMIDITY "Build with Timidity wave table MIDI sequencer support" ON)
if(USE_MIDI_TIMIDITY AND NOT USE_SYSTEM_AUDIO_LIBRARIES)
@@ -521,9 +521,9 @@ if(USE_MIDI)
HINTS "${AUDIO_CODECS_INSTALL_PATH}/lib")
endif()
list(APPEND SDLMixerX_LINK_LIBS ${LIBTIMIDITY_LIB})
list(APPEND SDLMixerX_SOURCES
${SDLMixerX_SOURCE_DIR}/src/codecs/music_timidity.c)
endif()
# Keep in build list even not used (to link necessary calls)
list(APPEND SDLMixerX_SOURCES ${SDLMixerX_SOURCE_DIR}/src/codecs/music_timidity.c)

option(USE_MIDI_FLUIDSYNTH "Build with FluidSynth wave table MIDI sequencer support" OFF)
if(USE_MIDI_FLUIDSYNTH)
@@ -788,3 +788,17 @@ install(FILES
include/SDL_mixer_ext/SDL_mixer_ext.h
DESTINATION include/SDL2)

if(USE_SYSTEM_AUDIO_LIBRARIES)
message("==== SDL Mixer X system-wide libraries ====")
message(" Vorbis found: ${FOUND_VORBIS}")
message(" OPUS found: ${FOUND_OPUS}")
message(" FLAC found: ${FOUND_FLAC}")
message(" libMAD found: ${FOUND_MAD}")
message(" MPG123 found: ${MPG123_FOUND}")
message(" ModPlug found: ${FOUND_MODPLUG}")
message(" MikMod found: ${FOUND_MIKMOD}")
message(" GME found: ${FOUND_GME}")
message(" libADLMIDI found: ${FOUND_ADLMIDI}")
message(" libOPNMIDI found: ${FOUND_OPNMIDI}")
message(" FluidSynth found: ${FOUND_FLUIDSYNTH}")
endif()

0 comments on commit d169c40

Please sign in to comment.