[sdl2-image] Fix usage (#14796)

This commit is contained in:
Jack·Boos·Yu 2020-11-30 11:01:16 -08:00 committed by GitHub
parent 09d71f3041
commit 94fe840933
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 2 deletions

View File

@ -110,13 +110,20 @@ install(TARGETS SDL2_image
install(FILES SDL_image.h DESTINATION include/SDL2 CONFIGURATIONS Release)
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/sdl2-image-config.cmake"
[[include(CMakeFindDependencyMacro)
find_dependency(SDL2 CONFIG)
include("${CMAKE_CURRENT_LIST_DIR}/sdl2-image-targets.cmake")
]])
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/sdl2-image-config.cmake DESTINATION share/sdl2-image)
install(EXPORT SDL2_image
DESTINATION share/sdl2-image/
FILE sdl2-image-config.cmake
FILE sdl2-image-targets.cmake
NAMESPACE SDL2::
)
message(STATUS "Link-time dependencies:")
message(STATUS " " SDL2::SDL2)
foreach(DEPENDENCY ${DEPENDENCIES})

View File

@ -1,5 +1,6 @@
Source: sdl2-image
Version: 2.0.5
Port-Version: 1
Build-Depends: sdl2, libpng
Homepage: https://www.libsdl.org/projects/SDL_image
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