From 20f7f524ca3d5d447bc9e2e78cada93244ee0dd8 Mon Sep 17 00:00:00 2001 From: Braden Obrzut Date: Sat, 23 Jan 2016 20:09:39 -0500 Subject: [PATCH] - Don't link against sndfile and mpg123 if not compiling with OpenAL support. --- src/CMakeLists.txt | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 70890c5fc..40503f8e9 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -286,16 +286,19 @@ if( NO_FMOD ) endif( NO_FMOD ) if( NO_OPENAL ) add_definitions( -DNO_OPENAL=1 ) + + set(MPG123_FOUND NO) + set(SNDFILE_FOUND NO) +else( NO_OPENAL ) + # Search for libSndFile + + find_package( SndFile ) + + # Search for libmpg123 + + find_package( MPG123 ) endif( NO_OPENAL ) -# Search for libSndFile - -find_package( SndFile ) - -# Search for libmpg123 - -find_package( MPG123 ) - # Search for FluidSynth find_package( FluidSynth )