mirror of
https://github.com/love2d/megasource.git
synced 2026-08-12 08:30:59 +02:00
Add mpg123 to the main CMakeLists.txt.
This commit is contained in:
@@ -14,6 +14,7 @@ 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(DEP_MPG123_VER "1.15.3")
|
||||
|
||||
set(SKIP_INSTALL_ALL TRUE)
|
||||
|
||||
@@ -30,6 +31,7 @@ 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_subdirectory("libs/mpg123-${DEP_MPG123_VER}" ${CMAKE_BINARY_DIR}/mpg123)
|
||||
|
||||
add_executable(ldeptest src/test.cpp)
|
||||
target_link_libraries(ldeptest
|
||||
@@ -41,4 +43,10 @@ target_link_libraries(ldeptest
|
||||
ogg-static
|
||||
vorbis-static
|
||||
vorbisfile-static
|
||||
mpg123
|
||||
)
|
||||
|
||||
add_custom_command(TARGET ldeptest POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy
|
||||
$<TARGET_FILE:mpg123>
|
||||
${CMAKE_CURRENT_BINARY_DIR}/$<CONFIGURATION>/$<TARGET_FILE_NAME:mpg123>)
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include <ogg/ogg.h>
|
||||
#include <vorbis/codec.h>
|
||||
#include <vorbis/vorbisfile.h>
|
||||
#include "mpg123.h"
|
||||
|
||||
extern "C" {
|
||||
# include "lua.h"
|
||||
@@ -95,6 +96,13 @@ int main(int argc, const char **argv)
|
||||
return "vorbisfile";
|
||||
};
|
||||
|
||||
vfunc mpg123 = [](strs &c, strs &l)
|
||||
{
|
||||
mpg123_init();
|
||||
c << "N/A";
|
||||
l << "N/A";
|
||||
return "mpg123";
|
||||
};
|
||||
|
||||
std::vector<vfunc> funcs;
|
||||
funcs.push_back(zlib);
|
||||
@@ -105,6 +113,7 @@ int main(int argc, const char **argv)
|
||||
funcs.push_back(ogg);
|
||||
funcs.push_back(vorbis);
|
||||
funcs.push_back(vorbisfile);
|
||||
funcs.push_back(mpg123);
|
||||
|
||||
for (size_t i = 0; i < funcs.size(); ++i)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user