mirror of
https://github.com/love2d/megasource.git
synced 2026-08-12 08:30:59 +02:00
Add ogg, vorbis, vorbisfile to main CMakeLists.txt.
This commit is contained in:
@@ -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
|
||||
)
|
||||
|
||||
@@ -8,6 +8,9 @@
|
||||
#include <physfs.h>
|
||||
#include <png.h>
|
||||
#include <jpeglib.h>
|
||||
#include <ogg/ogg.h>
|
||||
#include <vorbis/codec.h>
|
||||
#include <vorbis/vorbisfile.h>
|
||||
|
||||
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<vfunc> 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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user