server shouldn't require sound

This commit is contained in:
darkrose 2014-08-23 23:46:11 +10:00
parent 24dd10506d
commit 647a952e19
2 changed files with 18 additions and 1 deletions

View File

@ -34,7 +34,8 @@ OPTION(ENABLE_AUDIO "Enable audio" ON)
# this is only set to 1 if audio is enabled _and_ available
set(USE_AUDIO 0)
if(BUILD_CLIENT)
if(ENABLE_AUDIO)
# Sound libraries
find_package(OpenAL)
@ -59,6 +60,12 @@ if(ENABLE_AUDIO)
message(FATAL_ERROR "Sound enabled, but OpenAL not found!")
endif(OPENAL_FOUND)
endif(ENABLE_AUDIO)
endif(BUILD_CLIENT)
if(USE_AUDIO)
else()
set(audio_SRCS sound.cpp)
endif(USE_AUDIO)
if(NOT MSVC)
set(USE_GPROF 0 CACHE BOOL "Use -pg flag for g++")

View File

@ -73,3 +73,13 @@ void init_sounds(ISoundManager *sound)
// CMT_LIQUID
// CMT_WOOD
}
#ifdef SERVER
ISoundManager *createSoundManager()
{
return NULL;
};
#endif