vcpkg/ports/imageinfo/portfile.cmake

25 lines
851 B
CMake
Raw Normal View History

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}")