aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2014-08-05 01:48:30 -0700
committerChris Robinson <[email protected]>2014-08-05 01:48:30 -0700
commit7b4a2335eb50c5876acffb08cfb99a5d1f116f7b (patch)
tree41410345dfa85a9fb1a1a17c390c5e7a2f34ea9d /CMakeLists.txt
parent451b780e081bdf574392786df6a5ca712128b891 (diff)
Load fluidsynth dynamically when possible
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt67
1 files changed, 34 insertions, 33 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c7c73600..da3f160f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -555,10 +555,26 @@ SET(ALC_OBJS Alc/ALc.c
SET(CPU_EXTS "Default")
-SET(HAVE_SSE 0)
-SET(HAVE_SSE2 0)
-SET(HAVE_SSE4_1 0)
-SET(HAVE_NEON 0)
+SET(HAVE_SSE 0)
+SET(HAVE_SSE2 0)
+SET(HAVE_SSE4_1 0)
+SET(HAVE_NEON 0)
+
+SET(HAVE_FLUIDSYNTH 0)
+
+SET(HAVE_ALSA 0)
+SET(HAVE_OSS 0)
+SET(HAVE_SOLARIS 0)
+SET(HAVE_SNDIO 0)
+SET(HAVE_QSA 0)
+SET(HAVE_DSOUND 0)
+SET(HAVE_MMDEVAPI 0)
+SET(HAVE_WINMM 0)
+SET(HAVE_PORTAUDIO 0)
+SET(HAVE_PULSEAUDIO 0)
+SET(HAVE_COREAUDIO 0)
+SET(HAVE_OPENSL 0)
+SET(HAVE_WAVE 0)
# Check for SSE support
OPTION(ALSOFT_REQUIRE_SSE "Require SSE support" OFF)
@@ -637,6 +653,17 @@ IF(ALSOFT_REQUIRE_NEON AND NOT HAVE_NEON)
ENDIF()
+IF(WIN32 OR HAVE_DLFCN_H)
+ SET(IS_LINKED "")
+ MACRO(ADD_BACKEND_LIBS _LIBS)
+ ENDMACRO()
+ELSE()
+ SET(IS_LINKED " (linked)")
+ MACRO(ADD_BACKEND_LIBS _LIBS)
+ SET(EXTRA_LIBS ${_LIBS} ${EXTRA_LIBS})
+ ENDMACRO()
+ENDIF()
+
SET(ALC_OBJS ${ALC_OBJS}
Alc/midi/base.c
Alc/midi/sf2load.c
@@ -645,8 +672,6 @@ SET(ALC_OBJS ${ALC_OBJS}
Alc/midi/soft.c
)
-SET(HAVE_FLUIDSYNTH 0)
-
# Check for FluidSynth support
OPTION(ALSOFT_REQUIRE_FLUIDSYNTH "Require FluidSynth MIDI" OFF)
FIND_PACKAGE(FluidSynth)
@@ -654,10 +679,10 @@ IF(FLUIDSYNTH_FOUND)
OPTION(ALSOFT_MIDI_FLUIDSYNTH "Enable FluidSynth MIDI" ON)
IF(ALSOFT_MIDI_FLUIDSYNTH)
SET(HAVE_FLUIDSYNTH 1)
+ ADD_BACKEND_LIBS(${FLUIDSYNTH_LIBRARIES})
IF(CMAKE_VERSION VERSION_LESS "2.8.8")
- INCLUDE_DIRECTORIES(${FLUIDSYNTH_INCLUDE_DIR})
+ INCLUDE_DIRECTORIES(${ALSA_INCLUDE_DIRS})
ENDIF()
- SET(EXTRA_LIBS ${FLUIDSYNTH_LIBRARIES} ${EXTRA_LIBS})
ENDIF()
ENDIF()
IF(ALSOFT_REQUIRE_FLUIDSYNTH AND NOT HAVE_FLUIDSYNTH)
@@ -665,6 +690,7 @@ IF(ALSOFT_REQUIRE_FLUIDSYNTH AND NOT HAVE_FLUIDSYNTH)
ENDIF()
+SET(BACKENDS "")
SET(ALC_OBJS ${ALC_OBJS}
Alc/backends/base.c
# Default backends, always available
@@ -672,31 +698,6 @@ SET(ALC_OBJS ${ALC_OBJS}
Alc/backends/null.c
)
-SET(BACKENDS "")
-SET(HAVE_ALSA 0)
-SET(HAVE_OSS 0)
-SET(HAVE_SOLARIS 0)
-SET(HAVE_SNDIO 0)
-SET(HAVE_QSA 0)
-SET(HAVE_DSOUND 0)
-SET(HAVE_MMDEVAPI 0)
-SET(HAVE_WINMM 0)
-SET(HAVE_PORTAUDIO 0)
-SET(HAVE_PULSEAUDIO 0)
-SET(HAVE_COREAUDIO 0)
-SET(HAVE_OPENSL 0)
-SET(HAVE_WAVE 0)
-IF(WIN32 OR HAVE_DLFCN_H)
- SET(IS_LINKED "")
- MACRO(ADD_BACKEND_LIBS _LIBS)
- ENDMACRO()
-ELSE()
- SET(IS_LINKED " (linked)")
- MACRO(ADD_BACKEND_LIBS _LIBS)
- SET(EXTRA_LIBS ${_LIBS} ${EXTRA_LIBS})
- ENDMACRO()
-ENDIF()
-
# Check ALSA backend
OPTION(ALSOFT_REQUIRE_ALSA "Require ALSA backend" OFF)
FIND_PACKAGE(ALSA)