aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt9
1 files changed, 8 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 363c7974..09ba20d0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -22,7 +22,9 @@ OPTION(WINMM "Check for Windows Multimedia backend" ON)
OPTION(DLOPEN "Check for the dlopen API for loading optional libs" ON)
-OPTION(WERROR "Treat compile warnings as errors" OFF)
+OPTION(WERROR "Treat compile warnings as errors" OFF)
+
+OPTION(EXAMPLES "Build example programs" ON)
SET(LIB_MAJOR_VERSION "1")
@@ -316,6 +318,11 @@ INSTALL(FILES include/AL/al.h
DESTINATION include/AL
)
+IF(EXAMPLES)
+ ADD_EXECUTABLE(openal-info examples/openal-info.c)
+ TARGET_LINK_LIBRARIES(openal-info ${LIBNAME})
+ENDIF()
+
MESSAGE(STATUS "")
MESSAGE(STATUS "Building OpenAL with support for the following backends:")
MESSAGE(STATUS " ${BACKENDS}")