diff --git a/ports/imageinfo/portfile.cmake b/ports/imageinfo/portfile.cmake new file mode 100644 index 0000000000..e7d0bdc397 --- /dev/null +++ b/ports/imageinfo/portfile.cmake @@ -0,0 +1,24 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO xiaozhuai/imageinfo + REF 724301f7ef5e29410e78cd900ae25f9fa2e3080a # committed on 2023-01-31 + SHA512 b9ba5d2ec5698b9eee4eb07e0dbb50d0f361e730b6d468ac6e4c90b29375f6468f45214573673de5f9388d532794f922a556153d34cba5d6ccec854c20d34506 + HEAD_REF master +) + +set(VCPKG_BUILD_TYPE release) # header-only port + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -DIMAGEINFO_BUILD_TOOL=OFF + -DIMAGEINFO_BUILD_TESTS=OFF +) + +vcpkg_cmake_install() +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/imageinfo) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib") + +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) +file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") diff --git a/ports/imageinfo/usage b/ports/imageinfo/usage new file mode 100644 index 0000000000..b28d322063 --- /dev/null +++ b/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/ports/imageinfo/vcpkg.json b/ports/imageinfo/vcpkg.json new file mode 100644 index 0000000000..ff5b516ccf --- /dev/null +++ b/ports/imageinfo/vcpkg.json @@ -0,0 +1,17 @@ +{ + "name": "imageinfo", + "version-date": "2023-01-31", + "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 + } + ] +} diff --git a/versions/baseline.json b/versions/baseline.json index 6e938d67bd..ef16682a6d 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -3140,6 +3140,10 @@ "baseline": "2022-10-11", "port-version": 0 }, + "imageinfo": { + "baseline": "2023-01-31", + "port-version": 0 + }, "imath": { "baseline": "3.1.5", "port-version": 0 diff --git a/versions/i-/imageinfo.json b/versions/i-/imageinfo.json new file mode 100644 index 0000000000..c70ad20e50 --- /dev/null +++ b/versions/i-/imageinfo.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "66f45650934f8561d3779ca4a29d808b8d1cea98", + "version-date": "2023-01-31", + "port-version": 0 + } + ] +}