From: James Turner Date: Fri, 28 Oct 2011 11:29:26 +0000 (+0100) Subject: Add sound test programs to the CMake build. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=e34f597fe2ffe9f4a05bb66623cc8d8e06c433f0;p=simgear.git Add sound test programs to the CMake build. --- diff --git a/simgear/sound/CMakeLists.txt b/simgear/sound/CMakeLists.txt index c07a7065..6670190a 100644 --- a/simgear/sound/CMakeLists.txt +++ b/simgear/sound/CMakeLists.txt @@ -16,4 +16,22 @@ set(SOURCES xmlsound.cxx ) -simgear_component(sound sound "${SOURCES}" "${HEADERS}") \ No newline at end of file +simgear_component(sound sound "${SOURCES}" "${HEADERS}") + +set(SOUND_TEST_LIBS + sgsound sgio sgmath sgstructure sgthreads sgtiming sgmisc sgdebug + ${CMAKE_THREAD_LIBS_INIT} + ${RT_LIBRARY} + ${ALUT_LIBRARY} ${OPENAL_LIBRARY}) + +function(create_test TEST_NAME) + add_executable(${TEST_NAME} ${TEST_NAME}.cxx) + target_link_libraries(${TEST_NAME} ${SOUND_TEST_LIBS}) + set_target_properties(${TEST_NAME} PROPERTIES + COMPILE_DEFINITIONS "SRC_DIR=\"${CMAKE_CURRENT_SOURCE_DIR}\"" ) +endfunction() + +create_test(openal_test1) +create_test(openal_test2) +create_test(openal_test3) +create_test(openal_test4)