[sdl2-image] Fix dependency libpng (#24248)

* [sdl2-image] Fix dependency libpng

* version

* add license

* version
This commit is contained in:
Jack·Boos·Yu 2022-04-20 21:46:31 +00:00 committed by GitHub
parent 63c539fdac
commit c0c7d23949
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 17 additions and 4 deletions

View File

@ -68,9 +68,9 @@ if(USE_WEBP)
endif() endif()
if(USE_PNG) if(USE_PNG)
find_package(libpng REQUIRED) find_package(PNG REQUIRED)
add_definitions(-DLOAD_PNG) add_definitions(-DLOAD_PNG)
target_link_libraries(SDL2_image PRIVATE png) target_link_libraries(SDL2_image PRIVATE PNG::PNG)
endif() endif()
if(USE_JPEG) if(USE_JPEG)

View File

@ -1,6 +1,13 @@
include(CMakeFindDependencyMacro) include(CMakeFindDependencyMacro)
find_dependency(SDL2 CONFIG) find_dependency(SDL2 CONFIG)
if(@USE_WEBP@) if(@USE_WEBP@)
find_dependency(WebP CONFIG) find_dependency(WebP CONFIG)
endif() endif()
if (@USE_PNG@)
find_dependency(PNG)
endif()
include("${CMAKE_CURRENT_LIST_DIR}/sdl2-image-targets.cmake") include("${CMAKE_CURRENT_LIST_DIR}/sdl2-image-targets.cmake")

View File

@ -1,9 +1,10 @@
{ {
"name": "sdl2-image", "name": "sdl2-image",
"version": "2.0.5", "version": "2.0.5",
"port-version": 5, "port-version": 6,
"description": "SDL_image is an image file loading library. It loads images as SDL surfaces and textures, and supports the following formats: BMP, GIF, JPEG, LBM, PCX, PNG, PNM, TGA, TIFF, WEBP, XCF, XPM, XV", "description": "SDL_image is an image file loading library. It loads images as SDL surfaces and textures, and supports the following formats: BMP, GIF, JPEG, LBM, PCX, PNG, PNM, TGA, TIFF, WEBP, XCF, XPM, XV",
"homepage": "https://www.libsdl.org/projects/SDL_image", "homepage": "https://www.libsdl.org/projects/SDL_image",
"license": "Zlib",
"dependencies": [ "dependencies": [
"libpng", "libpng",
"sdl2", "sdl2",

View File

@ -6378,7 +6378,7 @@
}, },
"sdl2-image": { "sdl2-image": {
"baseline": "2.0.5", "baseline": "2.0.5",
"port-version": 5 "port-version": 6
}, },
"sdl2-mixer": { "sdl2-mixer": {
"baseline": "2.0.4", "baseline": "2.0.4",

View File

@ -1,5 +1,10 @@
{ {
"versions": [ "versions": [
{
"git-tree": "e1ed993b97bc76d5a8abdf4e9e8e148903078a70",
"version": "2.0.5",
"port-version": 6
},
{ {
"git-tree": "623548e8c929f2160320bf9644e2cd5a75d4a608", "git-tree": "623548e8c929f2160320bf9644e2cd5a75d4a608",
"version": "2.0.5", "version": "2.0.5",