mirror of
https://github.com/ZDoom/zdoom-macos-deps.git
synced 2024-11-10 06:31:37 +00:00
deps: update sdl2_image to 2.8.0
This commit is contained in:
parent
c681e48434
commit
41426cca79
9 changed files with 97 additions and 45 deletions
36
deps/sdl2_image/include/SDL2/SDL_image.h
vendored
36
deps/sdl2_image/include/SDL2/SDL_image.h
vendored
|
@ -42,8 +42,8 @@ extern "C" {
|
|||
* Printable format: "%d.%d.%d", MAJOR, MINOR, PATCHLEVEL
|
||||
*/
|
||||
#define SDL_IMAGE_MAJOR_VERSION 2
|
||||
#define SDL_IMAGE_MINOR_VERSION 6
|
||||
#define SDL_IMAGE_PATCHLEVEL 3
|
||||
#define SDL_IMAGE_MINOR_VERSION 8
|
||||
#define SDL_IMAGE_PATCHLEVEL 0
|
||||
|
||||
/**
|
||||
* This macro can be used to fill a version structure with the compile-time
|
||||
|
@ -113,12 +113,12 @@ typedef enum
|
|||
*
|
||||
* Currently, these flags are:
|
||||
*
|
||||
* - `_INIT_JPG`
|
||||
* - `_INIT_PNG`
|
||||
* - `_INIT_TIF`
|
||||
* - `_INIT_WEBP`
|
||||
* - `_INIT_JXL`
|
||||
* - `_INIT_AVIF`
|
||||
* - `IMG_INIT_JPG`
|
||||
* - `IMG_INIT_PNG`
|
||||
* - `IMG_INIT_TIF`
|
||||
* - `IMG_INIT_WEBP`
|
||||
* - `IMG_INIT_JXL`
|
||||
* - `IMG_INIT_AVIF`
|
||||
*
|
||||
* More flags may be added in a future SDL_image release.
|
||||
*
|
||||
|
@ -2150,6 +2150,26 @@ extern DECLSPEC void SDLCALL IMG_FreeAnimation(IMG_Animation *anim);
|
|||
*/
|
||||
extern DECLSPEC IMG_Animation * SDLCALL IMG_LoadGIFAnimation_RW(SDL_RWops *src);
|
||||
|
||||
/**
|
||||
* Load a WEBP animation directly.
|
||||
*
|
||||
* If you know you definitely have a WEBP image, you can call this function,
|
||||
* which will skip SDL_image's file format detection routines. Generally it's
|
||||
* better to use the abstract interfaces; also, there is only an SDL_RWops
|
||||
* interface available here.
|
||||
*
|
||||
* \param src an SDL_RWops that data will be read from.
|
||||
* \returns a new IMG_Animation, or NULL on error.
|
||||
*
|
||||
* \since This function is available since SDL_image 2.6.0.
|
||||
*
|
||||
* \sa IMG_LoadAnimation
|
||||
* \sa IMG_LoadAnimation_RW
|
||||
* \sa IMG_LoadAnimationTyped_RW
|
||||
* \sa IMG_FreeAnimation
|
||||
*/
|
||||
extern DECLSPEC IMG_Animation * SDLCALL IMG_LoadWEBPAnimation_RW(SDL_RWops *src);
|
||||
|
||||
/**
|
||||
* Report SDL_image errors
|
||||
*
|
||||
|
|
32
deps/sdl2_image/lib/cmake/Findwebp.cmake
vendored
32
deps/sdl2_image/lib/cmake/Findwebp.cmake
vendored
|
@ -1,32 +0,0 @@
|
|||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
find_library(webp_LIBRARY
|
||||
NAMES webp
|
||||
)
|
||||
|
||||
find_path(webp_INCLUDE_PATH
|
||||
NAMES webp/decode.h
|
||||
)
|
||||
|
||||
set(webp_COMPILE_OPTIONS "" CACHE STRING "Extra compile options of webp")
|
||||
|
||||
set(webp_LINK_LIBRARIES "" CACHE STRING "Extra link libraries of webp")
|
||||
|
||||
set(webp_LINK_FLAGS "" CACHE STRING "Extra link flags of webp")
|
||||
|
||||
find_package_handle_standard_args(webp
|
||||
REQUIRED_VARS webp_LIBRARY webp_INCLUDE_PATH
|
||||
)
|
||||
|
||||
if (webp_FOUND)
|
||||
if (NOT TARGET WebP::webp)
|
||||
add_library(WebP::webp UNKNOWN IMPORTED)
|
||||
set_target_properties(WebP::webp PROPERTIES
|
||||
IMPORTED_LOCATION "${webp_LIBRARY}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${webp_INCLUDE_PATH}"
|
||||
INTERFACE_COMPILE_OPTIONS "${webp_COMPILE_FLAGS}"
|
||||
INTERFACE_LINK_LIBRARIES "${webp_LINK_LIBRARIES}"
|
||||
INTERFACE_LINK_FLAGS "${webp_LINK_FLAGS}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
56
deps/sdl2_image/lib/cmake/SDL2_image/Findwebp.cmake
vendored
Normal file
56
deps/sdl2_image/lib/cmake/SDL2_image/Findwebp.cmake
vendored
Normal file
|
@ -0,0 +1,56 @@
|
|||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
find_library(webp_LIBRARY
|
||||
NAMES webp
|
||||
)
|
||||
|
||||
find_path(webp_INCLUDE_PATH
|
||||
NAMES webp/decode.h
|
||||
)
|
||||
|
||||
set(webp_COMPILE_OPTIONS "" CACHE STRING "Extra compile options of webp")
|
||||
|
||||
set(webp_LINK_LIBRARIES "" CACHE STRING "Extra link libraries of webp")
|
||||
|
||||
set(webp_LINK_FLAGS "" CACHE STRING "Extra link flags of webp")
|
||||
|
||||
find_library(webpdemux_LIBRARY
|
||||
NAMES webpdemux
|
||||
)
|
||||
|
||||
find_path(webpdemux_INCLUDE_PATH
|
||||
NAMES webp/demux.h
|
||||
)
|
||||
|
||||
set(webpdemux_COMPILE_OPTIONS "" CACHE STRING "Extra compile options of webpdemux")
|
||||
|
||||
set(webpdemux_LINK_LIBRARIES "" CACHE STRING "Extra link libraries of webpdemux")
|
||||
|
||||
set(webpdemux_LINK_FLAGS "" CACHE STRING "Extra link flags of webpdemux")
|
||||
|
||||
find_package_handle_standard_args(webp
|
||||
REQUIRED_VARS webp_LIBRARY webp_INCLUDE_PATH webpdemux_LIBRARY webpdemux_INCLUDE_PATH
|
||||
)
|
||||
|
||||
if (webp_FOUND)
|
||||
if (NOT TARGET WebP::webp)
|
||||
add_library(WebP::webp UNKNOWN IMPORTED)
|
||||
set_target_properties(WebP::webp PROPERTIES
|
||||
IMPORTED_LOCATION "${webp_LIBRARY}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${webp_INCLUDE_PATH}"
|
||||
INTERFACE_COMPILE_OPTIONS "${webp_COMPILE_FLAGS}"
|
||||
INTERFACE_LINK_LIBRARIES "${webp_LINK_LIBRARIES}"
|
||||
INTERFACE_LINK_FLAGS "${webp_LINK_FLAGS}"
|
||||
)
|
||||
endif()
|
||||
if (NOT TARGET WEBP::webpdemux)
|
||||
add_library(WebP::webpdemux UNKNOWN IMPORTED)
|
||||
set_target_properties(WebP::webpdemux PROPERTIES
|
||||
IMPORTED_LOCATION "${webpdemux_LIBRARY}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${webpdemux_INCLUDE_PATH}"
|
||||
INTERFACE_COMPILE_OPTIONS "${webpdemux_COMPILE_FLAGS}"
|
||||
INTERFACE_LINK_LIBRARIES "${webwebpdemux_LINK_LIBRARIES}"
|
||||
INTERFACE_LINK_FLAGS "${webpdemux_LINK_FLAGS}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
|
@ -50,6 +50,7 @@ unset(_cmake_expected_targets)
|
|||
get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH)
|
||||
get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
|
||||
get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
|
||||
get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
|
||||
if(_IMPORT_PREFIX STREQUAL "/")
|
||||
set(_IMPORT_PREFIX "")
|
||||
endif()
|
||||
|
@ -58,8 +59,8 @@ endif()
|
|||
add_library(SDL2_image::SDL2_image-static STATIC IMPORTED)
|
||||
|
||||
set_target_properties(SDL2_image::SDL2_image-static PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include/SDL2"
|
||||
INTERFACE_LINK_LIBRARIES "\$<LINK_ONLY:SDL2::SDL2-static>;\$<LINK_ONLY:objc>"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include;${_IMPORT_PREFIX}/include/SDL2"
|
||||
INTERFACE_LINK_LIBRARIES "\$<LINK_ONLY:>;-Wl,-framework,ApplicationServices;\$<LINK_ONLY:objc>;\$<LINK_ONLY:WebP::webp>;\$<LINK_ONLY:WebP::webpdemux>"
|
||||
)
|
||||
|
||||
if(CMAKE_VERSION VERSION_LESS 2.8.12)
|
|
@ -24,7 +24,7 @@ set(SDL2IMAGE_TIF OFF)
|
|||
set(SDL2IMAGE_XCF ON)
|
||||
set(SDL2IMAGE_XPM ON)
|
||||
set(SDL2IMAGE_XV ON)
|
||||
set(SDL2IMAGE_WEBP OFF)
|
||||
set(SDL2IMAGE_WEBP YES)
|
||||
|
||||
set(SDL2IMAGE_JPG_SAVE ON)
|
||||
set(SDL2IMAGE_PNG_SAVE ON)
|
||||
|
@ -45,7 +45,14 @@ endif()
|
|||
include(CMakeFindDependencyMacro)
|
||||
|
||||
if(SDL2IMAGE_AVIF AND NOT SDL2IMAGE_VENDORED AND NOT TARGET avif)
|
||||
find_dependency(libavif 0.9.1)
|
||||
find_package(libavif 1.0 QUIET)
|
||||
if(NOT libavif_FOUND)
|
||||
find_package(libavif 0.9.3 QUIET)
|
||||
endif()
|
||||
if(NOT libavif_FOUND)
|
||||
set(SDL3_image_FOUND FALSE)
|
||||
return()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(SDL2IMAGE_JPG AND NOT SDL2IMAGE_VENDORED AND NOT TARGET JPEG::JPEG)
|
|
@ -7,7 +7,7 @@
|
|||
# PACKAGE_VERSION_COMPATIBLE if the current version is >= requested version.
|
||||
# The variable CVF_VERSION must be set before calling configure_file().
|
||||
|
||||
set(PACKAGE_VERSION "2.6.3")
|
||||
set(PACKAGE_VERSION "2.8.0")
|
||||
|
||||
if (PACKAGE_FIND_VERSION_RANGE)
|
||||
# Package version must be in the requested version range
|
BIN
deps/sdl2_image/lib/libSDL2_image.a
vendored
BIN
deps/sdl2_image/lib/libSDL2_image.a
vendored
Binary file not shown.
Loading…
Reference in a new issue