mirror of
https://github.com/love2d/megasource.git
synced 2026-08-12 00:20:55 +02:00
Add DevIL to main CMakeLists.txt.
This commit is contained in:
@@ -20,6 +20,7 @@ set(DEP_SDL2_VER "2.0.0")
|
||||
set(DEP_OPENAL_VER "1.15.1")
|
||||
set(DEP_JASPER_VER "1.900.1")
|
||||
set(DEP_TIFF_VER "4.0.3")
|
||||
set(DEP_DEVIL_VER "1.7.8")
|
||||
|
||||
set(SKIP_INSTALL_ALL TRUE)
|
||||
|
||||
@@ -42,6 +43,7 @@ add_subdirectory("libs/SDL2-${DEP_SDL2_VER}" ${CMAKE_BINARY_DIR}/SDL2)
|
||||
add_subdirectory("libs/openal-soft-${DEP_OPENAL_VER}" ${CMAKE_BINARY_DIR}/openal-soft)
|
||||
add_subdirectory("libs/jasper-${DEP_JASPER_VER}" ${CMAKE_BINARY_DIR}/jasper)
|
||||
add_subdirectory("libs/tiff-${DEP_TIFF_VER}" ${CMAKE_BINARY_DIR}/tiff)
|
||||
add_subdirectory("libs/DevIL-${DEP_DEVIL_VER}" ${CMAKE_BINARY_DIR}/DevIL)
|
||||
|
||||
link_directories(${SDL_LINK_DIR})
|
||||
add_executable(ldeptest src/test.cpp)
|
||||
@@ -61,6 +63,7 @@ target_link_libraries(ldeptest
|
||||
${OPENAL_LIB_NAME}
|
||||
jasper-static
|
||||
tiff-static
|
||||
DevIL
|
||||
)
|
||||
|
||||
function(add_move_dll ARG_TARGET)
|
||||
@@ -73,3 +76,4 @@ endfunction()
|
||||
add_move_dll(mpg123)
|
||||
add_move_dll(SDL2)
|
||||
add_move_dll(${OPENAL_LIB_NAME})
|
||||
add_move_dll(DevIL)
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#include <AL/alext.h>
|
||||
#include <tiff.h>
|
||||
#include <tiffio.h>
|
||||
#include <IL/il.h>
|
||||
|
||||
#ifdef WIN32
|
||||
#define JAS_WIN_MSVC_BUILD
|
||||
@@ -169,6 +170,14 @@ int main(int argc, char **argv)
|
||||
return "tiff";
|
||||
};
|
||||
|
||||
vfunc DevIL = [](strs &c, strs &l)
|
||||
{
|
||||
ilInit();
|
||||
c << IL_VERSION;
|
||||
l << "N/A";
|
||||
return "DevIL";
|
||||
};
|
||||
|
||||
std::vector<vfunc> funcs;
|
||||
funcs.push_back(zlib);
|
||||
funcs.push_back(physfs);
|
||||
@@ -184,6 +193,7 @@ int main(int argc, char **argv)
|
||||
funcs.push_back(OpenAL);
|
||||
funcs.push_back(jasper);
|
||||
funcs.push_back(tiff);
|
||||
funcs.push_back(DevIL);
|
||||
|
||||
for (size_t i = 0; i < funcs.size(); ++i)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user