diff options
author | Chris Robinson <[email protected]> | 2013-11-28 03:03:16 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2013-11-28 03:08:28 -0800 |
commit | a3c76c32740248a54827696b87841c6381ee8550 (patch) | |
tree | 0e2d690c2a1a36b467d4fd9a2ce95c26cf6a267b /CMakeLists.txt | |
parent | a48f362d282401ddefe742188bd13a59fc79835e (diff) |
Add an option for FLuidSynth to handle MIDI
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 1d5b6960..c7fbc095 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -53,6 +53,8 @@ OPTION(ALSOFT_BACKEND_COREAUDIO "Check for CoreAudio backend" ON) OPTION(ALSOFT_BACKEND_OPENSL "Check for OpenSL backend" ON) OPTION(ALSOFT_BACKEND_WAVE "Enable Wave Writer backend" ON) +OPTION(ALSOFT_MIDI_FLUIDSYNTH "Check for FluidSynth MIDI" ON) + OPTION(ALSOFT_REQUIRE_ALSA "Require ALSA backend" OFF) OPTION(ALSOFT_REQUIRE_OSS "Require OSS backend" OFF) OPTION(ALSOFT_REQUIRE_SOLARIS "Require Solaris backend" OFF) @@ -66,6 +68,8 @@ OPTION(ALSOFT_REQUIRE_PULSEAUDIO "Require PulseAudio backend" OFF) OPTION(ALSOFT_REQUIRE_COREAUDIO "Require CoreAudio backend" OFF) OPTION(ALSOFT_REQUIRE_OPENSL "Require OpenSL backend" OFF) +OPTION(ALSOFT_REQUIRE_FLUIDSYNTH "Require FluidSynth MIDI" OFF) + OPTION(ALSOFT_DLOPEN "Check for the dlopen API for loading optional libs" ON) OPTION(ALSOFT_WERROR "Treat compile warnings as errors" OFF) @@ -553,6 +557,23 @@ IF(ALSOFT_REQUIRE_NEON AND NOT HAVE_NEON) ENDIF() +SET(HAVE_MIDI_SYNTH 0) +# Check for FluidSynth support +IF(ALSOFT_MIDI_FLUIDSYNTH) + FIND_PACKAGE(FluidSynth) + IF(FLUIDSYNTH_FOUND) + SET(HAVE_FLUIDSYNTH 1) + IF(CMAKE_VERSION VERSION_LESS "2.8.8") + INCLUDE_DIRECTORIES(${FLUIDSYNTH_INCLUDE_DIR}) + ENDIF() + SET(EXTRA_LIBS ${FLUIDSYNTH_LIBRARIES} ${EXTRA_LIBS}) + ENDIF() +ENDIF() +IF(ALSOFT_REQUIRE_FLUIDSYNTH AND NOT HAVE_FLUIDSYNTH) + MESSAGE(FATAL_ERROR "Failed to enabled required FluidSynth support") +ENDIF() + + SET(ALC_OBJS ${ALC_OBJS} Alc/backends/base.c # Default backends, always available @@ -847,6 +868,9 @@ IF(WIN32 AND ALSOFT_NO_UID_DEFS) SET_PROPERTY(TARGET ${LIBNAME} APPEND PROPERTY COMPILE_DEFINITIONS AL_NO_UID_DEFS) ENDIF() SET_PROPERTY(TARGET ${LIBNAME} APPEND PROPERTY INCLUDE_DIRECTORIES "${OpenAL_SOURCE_DIR}/OpenAL32/Include" "${OpenAL_SOURCE_DIR}/Alc") +IF(FLUIDSYNTH_FOUND) + SET_PROPERTY(TARGET ${LIBNAME} APPEND PROPERTY INCLUDE_DIRECTORIES ${FLUIDSYNTH_INCLUDE_DIR}) +ENDIF() SET_TARGET_PROPERTIES(${LIBNAME} PROPERTIES VERSION ${LIB_VERSION} SOVERSION ${LIB_MAJOR_VERSION}) IF(WIN32 AND NOT LIBTYPE STREQUAL "STATIC") @@ -880,6 +904,10 @@ MESSAGE(STATUS "") MESSAGE(STATUS "Building with support for CPU extensions:") MESSAGE(STATUS " ${CPU_EXTS}") MESSAGE(STATUS "") +IF(HAVE_FLUIDSYNTH) + MESSAGE(STATUS "FluidSynth support for ALC_SOFT_midi_interface enabled") + MESSAGE(STATUS "") +ENDIF() IF(WIN32) IF(NOT HAVE_DSOUND) |