From ae7ad1aef6609c64f5d4d28ecf1239dcc8e46e11 Mon Sep 17 00:00:00 2001 From: rude Date: Wed, 25 Sep 2013 16:07:52 +0200 Subject: [PATCH] Add ogg, vorbis, vorbisfile to main CMakeLists.txt. --- CMakeLists.txt | 9 +++++++++ src/test.cpp | 28 ++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 63299914..17e13427 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,6 +12,8 @@ set(DEP_PHYSFS_VER "2.0.3") set(DEP_LUA51_VER "5.1.5") set(DEP_LIBPNG_VER "166") set(DEP_JPEG_VER "9") +set(DEP_LIBOGG_VER "1.3.1") +set(DEP_LIBVORBIS_VER "1.3.3") set(SKIP_INSTALL_ALL TRUE) @@ -19,11 +21,15 @@ set(ZLIB_FOUND TRUE) set(ZLIB_LIBRARY zlibstatic) set(ZLIB_INCLUDE_DIR .) +set(OGG_LIBRARY ogg-static) + add_subdirectory("libs/zlib-${DEP_ZLIB_VER}" ${CMAKE_BINARY_DIR}/zlib) add_subdirectory("libs/physfs-${DEP_PHYSFS_VER}" ${CMAKE_BINARY_DIR}/physfs) add_subdirectory("libs/lua-${DEP_LUA51_VER}" ${CMAKE_BINARY_DIR}/lua51) add_subdirectory("libs/lpng${DEP_LIBPNG_VER}" ${CMAKE_BINARY_DIR}/lpng) add_subdirectory("libs/jpeg-${DEP_JPEG_VER}" ${CMAKE_BINARY_DIR}/jpeg) +add_subdirectory("libs/libogg-${DEP_LIBOGG_VER}" ${CMAKE_BINARY_DIR}/libogg) +add_subdirectory("libs/libvorbis-${DEP_LIBVORBIS_VER}" ${CMAKE_BINARY_DIR}/libvorbis) add_executable(ldeptest src/test.cpp) target_link_libraries(ldeptest @@ -32,4 +38,7 @@ target_link_libraries(ldeptest lua51-static ${PNG_LIB_NAME_STATIC} jpeg-static + ogg-static + vorbis-static + vorbisfile-static ) diff --git a/src/test.cpp b/src/test.cpp index 78a77fef..af5d43ba 100644 --- a/src/test.cpp +++ b/src/test.cpp @@ -8,6 +8,9 @@ #include #include #include +#include +#include +#include extern "C" { # include "lua.h" @@ -71,12 +74,37 @@ int main(int argc, const char **argv) return "jpeg"; }; + vfunc ogg = [](strs &c, strs &l) + { + c << "N/A"; + l << "N/A"; + return "ogg"; + }; + + vfunc vorbis = [](strs &c, strs &l) + { + c << "N/A"; + l << "N/A"; + return "vorbis"; + }; + + vfunc vorbisfile = [](strs &c, strs &l) + { + c << "N/A"; + l << "N/A"; + return "vorbisfile"; + }; + + std::vector funcs; funcs.push_back(zlib); funcs.push_back(physfs); funcs.push_back(lua); funcs.push_back(png); funcs.push_back(jpeg); + funcs.push_back(ogg); + funcs.push_back(vorbis); + funcs.push_back(vorbisfile); for (size_t i = 0; i < funcs.size(); ++i) {