2022-11-09 06:44:33 +08:00
|
|
|
vcpkg_from_github(
|
2019-03-12 04:15:08 +08:00
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
2022-11-09 06:44:33 +08:00
|
|
|
REPO libsdl-org/SDL_image
|
2023-02-10 02:54:02 +08:00
|
|
|
REF "release-${VERSION}"
|
2024-02-22 02:00:26 +08:00
|
|
|
SHA512 1ec6e7d08bbcd28bba6c972b2e4a11a1da841abef3ffb3d29669b0f5eb0839f39044b0b334c0707274dd51192e081f25bdab97c6710d632422c4ed0274a30f18
|
2022-11-09 06:44:33 +08:00
|
|
|
HEAD_REF main
|
2024-02-22 02:00:26 +08:00
|
|
|
PATCHES
|
|
|
|
fix-findwebp.patch
|
2017-01-05 23:42:52 +08:00
|
|
|
)
|
|
|
|
|
2022-11-09 06:44:33 +08:00
|
|
|
vcpkg_check_features(
|
|
|
|
OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
2022-04-16 04:44:08 +08:00
|
|
|
FEATURES
|
2022-11-09 06:44:33 +08:00
|
|
|
libjpeg-turbo SDL2IMAGE_JPG
|
|
|
|
libwebp SDL2IMAGE_WEBP
|
|
|
|
tiff SDL2IMAGE_TIF
|
2022-04-16 04:44:08 +08:00
|
|
|
)
|
2017-01-05 23:42:52 +08:00
|
|
|
|
2022-01-11 05:15:07 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2018-07-04 16:01:08 +08:00
|
|
|
OPTIONS
|
2022-04-16 04:44:08 +08:00
|
|
|
${FEATURE_OPTIONS}
|
2022-11-09 06:44:33 +08:00
|
|
|
-DSDL2IMAGE_BACKEND_IMAGEIO=OFF
|
|
|
|
-DSDL2IMAGE_BACKEND_STB=OFF
|
2022-12-07 07:19:01 +08:00
|
|
|
-DSDL2IMAGE_DEPS_SHARED=OFF
|
2022-11-09 06:44:33 +08:00
|
|
|
-DSDL2IMAGE_SAMPLES=OFF
|
|
|
|
-DSDL2IMAGE_VENDORED=OFF
|
2017-01-05 23:42:52 +08:00
|
|
|
)
|
|
|
|
|
2022-01-11 05:15:07 +08:00
|
|
|
vcpkg_cmake_install()
|
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
|
2022-11-09 06:44:33 +08:00
|
|
|
if(EXISTS "${CURRENT_PACKAGES_DIR}/cmake")
|
|
|
|
vcpkg_cmake_config_fixup(PACKAGE_NAME SDL2_image CONFIG_PATH cmake)
|
|
|
|
elseif(EXISTS "${CURRENT_PACKAGES_DIR}/SDL2_image.framework/Resources")
|
|
|
|
vcpkg_cmake_config_fixup(PACKAGE_NAME SDL2_image CONFIG_PATH SDL2_image.framework/Resources)
|
|
|
|
else()
|
|
|
|
vcpkg_cmake_config_fixup(PACKAGE_NAME SDL2_image CONFIG_PATH lib/cmake/SDL2_image)
|
|
|
|
endif()
|
|
|
|
|
2021-12-01 07:29:54 +08:00
|
|
|
vcpkg_fixup_pkgconfig()
|
2017-01-05 23:42:52 +08:00
|
|
|
|
2024-03-16 09:40:20 +08:00
|
|
|
if(NOT VCPKG_BUILD_TYPE)
|
|
|
|
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/SDL2_image.pc" "-lSDL2_image" "-lSDL2_imaged")
|
|
|
|
endif()
|
|
|
|
|
2022-11-09 06:44:33 +08:00
|
|
|
file(REMOVE_RECURSE
|
|
|
|
"${CURRENT_PACKAGES_DIR}/debug/share"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/debug/include"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/SDL2_image.framework"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/debug/SDL2_image.framework"
|
|
|
|
)
|
2019-03-27 00:57:16 +08:00
|
|
|
|
2022-11-09 06:44:33 +08:00
|
|
|
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.txt")
|