diff options
| author | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
|---|---|---|
| committer | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
| commit | 54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch) | |
| tree | d915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/imageinfo | |
Diffstat (limited to 'vcpkg/ports/imageinfo')
| -rw-r--r-- | vcpkg/ports/imageinfo/portfile.cmake | 33 | ||||
| -rw-r--r-- | vcpkg/ports/imageinfo/usage | 4 | ||||
| -rw-r--r-- | vcpkg/ports/imageinfo/vcpkg.json | 23 |
3 files changed, 60 insertions, 0 deletions
diff --git a/vcpkg/ports/imageinfo/portfile.cmake b/vcpkg/ports/imageinfo/portfile.cmake new file mode 100644 index 0000000..0479fae --- /dev/null +++ b/vcpkg/ports/imageinfo/portfile.cmake @@ -0,0 +1,33 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO xiaozhuai/imageinfo + REF 4e772f7d7d4453028c71f90e1783c390f5d78adf # committed on 2024-12-02 + SHA512 6ef9041a450c516ba84c5ccb4d96a2f5e27c0b45164e1db38b8df6adfeaec1725b76677955e8b2bf4d73842162cecf734ee25163af21eeeb045af48af92ba821 + HEAD_REF master +) + +set(VCPKG_BUILD_TYPE release) # header-only port + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + tools IMAGEINFO_BUILD_TOOLS +) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -DIMAGEINFO_BUILD_INSTALL=ON + -DIMAGEINFO_BUILD_TESTS=OFF + ${FEATURE_OPTIONS} +) + +vcpkg_cmake_install() +vcpkg_cmake_config_fixup() +if("tools" IN_LIST FEATURES) + vcpkg_copy_tools(TOOL_NAMES imageinfo AUTO_CLEAN) +endif() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib") + +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") +file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") diff --git a/vcpkg/ports/imageinfo/usage b/vcpkg/ports/imageinfo/usage new file mode 100644 index 0000000..b28d322 --- /dev/null +++ b/vcpkg/ports/imageinfo/usage @@ -0,0 +1,4 @@ +imageinfo provides CMake targets:
+
+ find_package(imageinfo CONFIG REQUIRED)
+ target_link_libraries(main PRIVATE imageinfo::imageinfo)
diff --git a/vcpkg/ports/imageinfo/vcpkg.json b/vcpkg/ports/imageinfo/vcpkg.json new file mode 100644 index 0000000..93dff91 --- /dev/null +++ b/vcpkg/ports/imageinfo/vcpkg.json @@ -0,0 +1,23 @@ +{ + "name": "imageinfo", + "version-date": "2024-12-02", + "description": "Cross platform super fast single header c++ library to get image size and format without loading/decoding. Support avif, bmp, cur, dds, gif, hdr (pic), heic (heif), icns, ico, jp2, jpeg (jpg), jpx, ktx, png, psd, qoi, tga, tiff (tif), webp ...", + "homepage": "https://github.com/xiaozhuai/imageinfo", + "license": "MIT", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], + "features": { + "tools": { + "description": "build command line tool", + "supports": "!android & !ios & !xbox & !wasm32" + } + } +} |