From c0c7d23949a5a2039b03d96ea27cc7e7dd75604d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jack=C2=B7Boos=C2=B7Yu?= <47264268+JackBoosY@users.noreply.github.com> Date: Wed, 20 Apr 2022 21:46:31 +0000 Subject: [PATCH] [sdl2-image] Fix dependency libpng (#24248) * [sdl2-image] Fix dependency libpng * version * add license * version --- ports/sdl2-image/CMakeLists.txt | 4 ++-- ports/sdl2-image/sdl2-image-config.cmake.in | 7 +++++++ ports/sdl2-image/vcpkg.json | 3 ++- versions/baseline.json | 2 +- versions/s-/sdl2-image.json | 5 +++++ 5 files changed, 17 insertions(+), 4 deletions(-) diff --git a/ports/sdl2-image/CMakeLists.txt b/ports/sdl2-image/CMakeLists.txt index deb52114e5..45b2b57e64 100644 --- a/ports/sdl2-image/CMakeLists.txt +++ b/ports/sdl2-image/CMakeLists.txt @@ -68,9 +68,9 @@ if(USE_WEBP) endif() if(USE_PNG) - find_package(libpng REQUIRED) + find_package(PNG REQUIRED) add_definitions(-DLOAD_PNG) - target_link_libraries(SDL2_image PRIVATE png) + target_link_libraries(SDL2_image PRIVATE PNG::PNG) endif() if(USE_JPEG) diff --git a/ports/sdl2-image/sdl2-image-config.cmake.in b/ports/sdl2-image/sdl2-image-config.cmake.in index d69bc6a49c..8db8b11d07 100644 --- a/ports/sdl2-image/sdl2-image-config.cmake.in +++ b/ports/sdl2-image/sdl2-image-config.cmake.in @@ -1,6 +1,13 @@ include(CMakeFindDependencyMacro) + find_dependency(SDL2 CONFIG) + if(@USE_WEBP@) find_dependency(WebP CONFIG) endif() + +if (@USE_PNG@) + find_dependency(PNG) +endif() + include("${CMAKE_CURRENT_LIST_DIR}/sdl2-image-targets.cmake") diff --git a/ports/sdl2-image/vcpkg.json b/ports/sdl2-image/vcpkg.json index 48df1caa2d..0eb0da92b8 100644 --- a/ports/sdl2-image/vcpkg.json +++ b/ports/sdl2-image/vcpkg.json @@ -1,9 +1,10 @@ { "name": "sdl2-image", "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", "homepage": "https://www.libsdl.org/projects/SDL_image", + "license": "Zlib", "dependencies": [ "libpng", "sdl2", diff --git a/versions/baseline.json b/versions/baseline.json index 3dc516163b..3019d40f9a 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -6378,7 +6378,7 @@ }, "sdl2-image": { "baseline": "2.0.5", - "port-version": 5 + "port-version": 6 }, "sdl2-mixer": { "baseline": "2.0.4", diff --git a/versions/s-/sdl2-image.json b/versions/s-/sdl2-image.json index 0e2c4254b7..cc213ea455 100644 --- a/versions/s-/sdl2-image.json +++ b/versions/s-/sdl2-image.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "e1ed993b97bc76d5a8abdf4e9e8e148903078a70", + "version": "2.0.5", + "port-version": 6 + }, { "git-tree": "623548e8c929f2160320bf9644e2cd5a75d4a608", "version": "2.0.5",