aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2015-10-13 11:43:25 -0700
committerChris Robinson <[email protected]>2015-10-13 11:43:25 -0700
commitc18e23477c5efc0183fa809622085b1ed413cb6b (patch)
treee4e455598e1a1726a75abc418df1edf28674f66d /CMakeLists.txt
parentd7ec9d355f25c4072954f7447c3e5d0f100ef8d6 (diff)
Add a tone generator test program
Currently used to test the general output, particularly the resampler, by checking the results with a spectrum analyzer and/or oscilloscope (for example using PulseAudio's "Monitor of ..." devices feeding an external app).
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt19
1 files changed, 19 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index af9e961a..822649ef 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -34,6 +34,7 @@ OPTION(ALSOFT_UTILS "Build and install utility programs" ON)
OPTION(ALSOFT_NO_CONFIG_UTIL "Disable building the alsoft-config utility" OFF)
OPTION(ALSOFT_EXAMPLES "Build and install example programs" ON)
+OPTION(ALSOFT_TESTS "Build and install test programs" ON)
OPTION(ALSOFT_CONFIG "Install alsoft.conf sample configuration file" ON)
OPTION(ALSOFT_HRTF_DEFS "Install HRTF definition files" ON)
@@ -1226,6 +1227,24 @@ IF(ALSOFT_UTILS)
MESSAGE(STATUS "")
ENDIF()
+IF(ALSOFT_TESTS)
+ ADD_LIBRARY(test-common STATIC examples/common/alhelpers.c)
+
+ ADD_EXECUTABLE(altonegen examples/altonegen.c)
+ TARGET_LINK_LIBRARIES(altonegen test-common ${LIBNAME})
+
+ IF(ALSOFT_INSTALL)
+ INSTALL(TARGETS altonegen
+ RUNTIME DESTINATION bin
+ LIBRARY DESTINATION "lib${LIB_SUFFIX}"
+ ARCHIVE DESTINATION "lib${LIB_SUFFIX}"
+ )
+ ENDIF()
+
+ MESSAGE(STATUS "Building test programs")
+ MESSAGE(STATUS "")
+ENDIF()
+
IF(ALSOFT_EXAMPLES)
IF(SDL2_FOUND AND SDL_SOUND_FOUND)
ADD_LIBRARY(ex-common STATIC examples/common/alhelpers.c