Don't try to use sound if building only server
authorPerttu Ahola <celeron55@gmail.com>
Sun, 25 Mar 2012 18:10:25 +0000 (21:10 +0300)
committerPerttu Ahola <celeron55@gmail.com>
Sun, 25 Mar 2012 18:10:25 +0000 (21:10 +0300)
src/CMakeLists.txt

index 5fea0546d24335a8a777095df2ab2d988560b6d3..b0cece120479a16f00d6e4a5d750c8da75c153a7 100644 (file)
@@ -45,7 +45,7 @@ OPTION(ENABLE_SOUND "Enable sound" ON)
 set(USE_SOUND 0)
 set(SOUND_PROBLEM 0)
 
-if(ENABLE_SOUND)
+if(ENABLE_SOUND AND BUILD_CLIENT)
        # Sound libraries
        find_package(OpenAL)
        find_package(Vorbis)
@@ -63,7 +63,7 @@ if(ENABLE_SOUND)
                set(USE_SOUND 1)
                message(STATUS "Sound enabled")
        endif()
-endif(ENABLE_SOUND)
+endif(ENABLE_SOUND AND BUILD_CLIENT)
 
 if(SOUND_PROBLEM)
        message(FATAL_ERROR "Sound enabled, but cannot be used.\n"