Add jpeg to main CMakeLists.txt.

This commit is contained in:
rude
2013-09-25 15:37:37 +02:00
parent 04e7e9eb65
commit 29e5d9903e
2 changed files with 18 additions and 1 deletions
+9 -1
View File
@@ -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
)
+9
View File
@@ -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)
{