mirror of
https://github.com/minetest/irrlicht.git
synced 2025-07-15 06:20:32 +02:00
Update CIrrDeviceSDL to support SDL2 (#85)
This commit is contained in:
@ -56,6 +56,7 @@ unset(OGLES1_ENABLED CACHE)
|
||||
unset(OGLES2_ENABLED CACHE)
|
||||
unset(OGL_ENABLED CACHE)
|
||||
unset(XINPUT2_ENABLED CACHE)
|
||||
unset(SDL_ENABLED CACHE)
|
||||
|
||||
check_symbol_exists(_IRR_COMPILE_WITH_OGLES1_ "IrrCompileConfig.h" OGLES1_ENABLED)
|
||||
if(OGLES1_ENABLED)
|
||||
@ -79,6 +80,12 @@ if(XINPUT2_ENABLED)
|
||||
find_library(XINPUT_LIBRARY Xi REQUIRED)
|
||||
endif()
|
||||
|
||||
check_symbol_exists(_IRR_COMPILE_WITH_SDL_DEVICE_ "IrrCompileConfig.h" SDL_ENABLED)
|
||||
if(SDL_ENABLED)
|
||||
find_package(SDL2 CONFIG REQUIRED)
|
||||
message(STATUS "Found SDL2: ${SDL2_LIBRARIES}")
|
||||
endif()
|
||||
|
||||
# Platform-specific libs
|
||||
|
||||
if(ANDROID)
|
||||
@ -101,6 +108,7 @@ set(link_includes
|
||||
"${ZLIB_INCLUDE_DIR}"
|
||||
"${JPEG_INCLUDE_DIR}"
|
||||
"${PNG_INCLUDE_DIR}"
|
||||
"${SDL2_INCLUDE_DIRS}"
|
||||
|
||||
${OPENGL_INCLUDE_DIR}
|
||||
${OPENGLES2_INCLUDE_DIR}
|
||||
@ -114,6 +122,7 @@ set(link_libs
|
||||
"${ZLIB_LIBRARY}"
|
||||
"${JPEG_LIBRARY}"
|
||||
"${PNG_LIBRARY}"
|
||||
"${SDL2_LIBRARIES}"
|
||||
|
||||
${OPENGL_LIBRARIES}
|
||||
${OPENGLES_LIBRARY}
|
||||
|
Reference in New Issue
Block a user