File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed
Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change 1- # CMake configuration for Nana
1+ # CMake configuration for Nana
22# Author: Andrew Kornilov(https://github.com/ierofant)
33# Contributor:
44# Robert Hauck - Enable support for PNG/Freetype
@@ -14,6 +14,7 @@ option(ENABLE_PNG "Enable the use of PNG" OFF)
1414option (LIBPNG_FROM_OS "Use libpng from operating system." ON )
1515option (ENABLE_JPEG "Enable the use of JPEG" OFF )
1616option (LIBJPEG_FROM_OS "Use libjpeg from operating system." ON )
17+ option (ENABLE_AUDIO "Enable class audio::play for PCM playback." OFF )
1718option (CMAKE_VERBOSE_PREPROCESSOR "Show annoying debug messages during compilation." OFF )
1819option (CMAKE_STOP_VERBOSE_PREPROCESSOR "Stop compilation after showing the annoying debug messages." ON )
1920option (BUILD_NANA_DEMOS "Build all the demos form the nana_demo repository." OFF )
@@ -98,7 +99,17 @@ if(ENABLE_JPEG)
9899 endif (LIBJPEG_FROM_OS )
99100endif (ENABLE_JPEG )
100101
101-
102+ if (ENABLE_AUDIO)
103+ add_definitions (-DNANA_ENABLE_AUDIO )
104+ if (UNIX )
105+ find_package (asound )
106+ if (ASOUND_FOUND)
107+ include_directories ( ${ASOUND_INCLUDE_DIRS} )
108+ else (ASOUND_FOUND )
109+ message (FATAL_ERROR "libasound is not found" )
110+ endif (ASOUND_FOUND )
111+ endif (UNIX )
112+ endif (ENABLE_AUDIO )
102113
103114#Unicode
104115if (CMAKE_VERBOSE_PREPROCESSOR)
You can’t perform that action at this time.
0 commit comments