mirror of
https://github.com/love2d/megasource.git
synced 2026-08-12 08:30:59 +02:00
Add jpeg to main CMakeLists.txt.
This commit is contained in:
+9
-1
@@ -11,6 +11,7 @@ set(DEP_ZLIB_VER "1.2.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(SKIP_INSTALL_ALL TRUE)
|
||||
|
||||
@@ -22,6 +23,13 @@ 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_executable(ldeptest src/test.cpp)
|
||||
target_link_libraries(ldeptest zlibstatic physfs-static lua51-static ${PNG_LIB_NAME_STATIC})
|
||||
target_link_libraries(ldeptest
|
||||
zlibstatic
|
||||
physfs-static
|
||||
lua51-static
|
||||
${PNG_LIB_NAME_STATIC}
|
||||
jpeg-static
|
||||
)
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include <zlib.h>
|
||||
#include <physfs.h>
|
||||
#include <png.h>
|
||||
#include <jpeglib.h>
|
||||
|
||||
extern "C" {
|
||||
# include "lua.h"
|
||||
@@ -63,11 +64,19 @@ int main(int argc, const char **argv)
|
||||
return "libpng";
|
||||
};
|
||||
|
||||
vfunc jpeg = [](strs &c, strs &l)
|
||||
{
|
||||
c << (int)JPEG_LIB_VERSION;
|
||||
l << "N/A";
|
||||
return "jpeg";
|
||||
};
|
||||
|
||||
std::vector<vfunc> funcs;
|
||||
funcs.push_back(zlib);
|
||||
funcs.push_back(physfs);
|
||||
funcs.push_back(lua);
|
||||
funcs.push_back(png);
|
||||
funcs.push_back(jpeg);
|
||||
|
||||
for (size_t i = 0; i < funcs.size(); ++i)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user