Skip to content
Browse files

Added SDL_mixer sound support compile conditions.

Default sound support library is now SDL_mixer. The CMake "SOUND"
directive controls what sound library the game will be compiled with.
When "-DSOUND=FMOD" is specified the sound lib chosen will be FMOD.
  • Loading branch information...
1 parent 71bc939 commit b6ae950ec74e219205dc808122da3dcf3f89f87b @petarov committed Jun 25, 2013
Showing with 8 additions and 2 deletions.
  1. +8 −2 CMakeLists.txt
View
10 CMakeLists.txt
@@ -111,7 +111,7 @@ endif()
## SOUND libraries
if (SOUND STREQUAL "NO")
message(STATUS "Found SOUND=NO option. Compiling without sound support ...")
-else()
+elseif(SOUND STREQUAL "FMOD")
# FModEx API
# check if path to FMod is defined
@@ -175,11 +175,17 @@ else()
DESTINATION ${INSTALL_DIR})
endif()
+else()
+ # SDL_mixer API
+ find_package(SDL_mixer REQUIRED)
+
+ add_definitions(-DWITH_SDLMIXER)
+
endif()
### link required libraries
-target_link_libraries(savagewheels ${SDL_LIBRARY} ${FMOD_LIBRARY})
+target_link_libraries(savagewheels ${SDL_LIBRARY} ${FMOD_LIBRARY} ${SDLMIXER_LIBRARY})
### additional defines

0 comments on commit b6ae950

Please sign in to comment.
Something went wrong with that request. Please try again.