vcpkg/ports/imageinfo/portfile.cmake

34 lines
1001 B
CMake
Raw Normal View History

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO xiaozhuai/imageinfo
REF d010e59f25867a0ee159143f8bf116f071d993b1 # committed on 2024-08-05
SHA512 a30c241608d44aa296f75debc988f7a8875eafe45ea925ca9d276975512cd1de9413b95c6421d1e37a71cb3e1c65f2bed101ffdf0e83ef3a883c8443a8bffb8d
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}")