summaryrefslogtreecommitdiffstats
path: root/test/unit
diff options
context:
space:
mode:
authorerihel <erihel@gmail.com>2013-03-14 20:41:48 +0100
committererihel <erihel@gmail.com>2013-03-14 20:41:48 +0100
commit47e7904bb7c4bdf8024a154602f7d1ede9b77387 (patch)
treea6a8edd433ea563ae047651f451bc04d8745b102 /test/unit
parentbc859c4c597f106d40f07380bf255f180d565577 (diff)
downloadcolobot-47e7904bb7c4bdf8024a154602f7d1ede9b77387.tar.gz
colobot-47e7904bb7c4bdf8024a154602f7d1ede9b77387.tar.bz2
colobot-47e7904bb7c4bdf8024a154602f7d1ede9b77387.zip
* Fix for issue #140 (not compiling sound files while sound support is enabled)
Diffstat (limited to 'test/unit')
-rw-r--r--test/unit/CMakeLists.txt28
1 files changed, 27 insertions, 1 deletions
diff --git a/test/unit/CMakeLists.txt b/test/unit/CMakeLists.txt
index 21d1986..575f5c0 100644
--- a/test/unit/CMakeLists.txt
+++ b/test/unit/CMakeLists.txt
@@ -134,6 +134,31 @@ ${SRC_DIR}/ui/target.cpp
${SRC_DIR}/ui/window.cpp
)
+set(OPENAL_SOURCES "")
+
+if (${OPENAL_SOUND})
+ set(OPENAL_SOURCES
+ ${SRC_DIR}/sound/oalsound/alsound.cpp
+ ${SRC_DIR}/sound/oalsound/buffer.cpp
+ ${SRC_DIR}/sound/oalsound/channel.cpp
+ )
+endif()
+
+# Optional libraries
+set(OPTIONAL_LIBS "")
+
+if (${OPENAL_SOUND})
+ if (${PLATFORM_WINDOWS})
+ set(OPTIONAL_LIBS
+ OpenAL32
+ )
+ else()
+ set(OPTIONAL_LIBS
+ openal
+ )
+ endif()
+endif()
+
set(UT_SOURCES
main.cpp
graphics/engine/lightman_test.cpp
@@ -165,9 +190,10 @@ ${GLEW_LIBRARY}
${Boost_LIBRARIES}
${OPTIONAL_LIBS}
${PLATFORM_LIBS}
+${LIBSNDFILE_LIBRARY}
)
-add_executable(colobot_ut ${COLOBOT_SOURCES} ${UT_SOURCES})
+add_executable(colobot_ut ${COLOBOT_SOURCES} ${UT_SOURCES} ${OPENAL_SOURCES})
target_link_libraries(colobot_ut ${LIBS})
add_test(colobot_ut ./colobot_ut)