vcpkg_from_github(
    OUT_SOURCE_PATH SOURCE_PATH
    REPO BlueBrain/HighFive
    REF v2.2.1
    SHA512 1f24b4db7c395d3ae33b9e06d5844b9aa90d58084c7170757ce9685de02de42b6392ac038aadbe617ab445e32b627a495f789cecf303afbcdff8a2dc5eeda170
    HEAD_REF master
)

vcpkg_configure_cmake(
    SOURCE_PATH ${SOURCE_PATH}
    PREFER_NINJA
    OPTIONS
     -DHIGHFIVE_USE_BOOST=OFF
     -DHIGHFIVE_USE_EIGEN=OFF
     -DHIGHFIVE_USE_XTENSOR=OFF
     -DHIGHFIVE_UNIT_TESTS=OFF
     -DHIGHFIVE_EXAMPLES=OFF
     -DHIGHFIVE_PARALLEL_HDF5=OFF
)

vcpkg_install_cmake()

file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug)
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/highfive RENAME copyright)
