Index: a2play/CMakeLists.txt
--- a2play/CMakeLists.txt.orig
+++ a2play/CMakeLists.txt
@@ -6,6 +6,8 @@
 include_directories(${AUDIALITY2_BINARY_DIR}/include)
 include_directories(${AUDIALITY2_SOURCE_DIR}/include)
 link_directories(${AUDIALITY2_BINARY_DIR})
+pkg_search_module(SDL2 sdl2)
+link_directories(${SDL2_LIBDIR})
 set(AUDIALITY2_LIBRARIES audiality2 ${AUDIALITY2_EXTRA_LIBRARIES})
 
 add_executable(a2play WIN32 MACOSX_BUNDLE a2play.c)
@@ -14,9 +16,6 @@ if(FORCE_32BIT)
 	set_target_properties(a2play PROPERTIES
 		COMPILE_FLAGS "-m32" LINK_FLAGS "-m32")
 endif(FORCE_32BIT)
-
-# Release build: full optimization, no debug features, no debug info
-set(CMAKE_C_FLAGS_RELEASE "-O3 -DNDEBUG")
 
 # Static release build: full optimization, no debug features, no debug info
 set(CMAKE_C_FLAGS_STATIC "-O3 -DNDEBUG")
