vcpkg_from_github(
  OUT_SOURCE_PATH SOURCE_PATH
  REPO bluequartzsoftware/h5support
  REF v1.0.7
  SHA512 fb430fb99bd85b65c900c4d1b9e3fa588419d94eb35812ce42b2fc5602eacab34f6689cece2f5745d125f78dc6d126f365181cce2a1fa242eafab09ab4cf876e
  HEAD_REF develop
)

vcpkg_configure_cmake(
  SOURCE_PATH "${SOURCE_PATH}"
  PREFER_NINJA
  OPTIONS
    -DH5Support_INCLUDE_QT_API=OFF
    -DH5Support_INSTALL_HDF5=OFF
    -DH5Support_INSTALL_QT5=OFF
    -DCMP_HDF5_ENABLE_COPY=OFF
    -DCMP_HDF5_ENABLE_CXX=OFF
    -DCMP_HDF5_ENABLE_INSTALL=OFF
    -DH5Support_BUILD_TESTING=OFF
    -DH5Support_CMAKE_CONFIG_INSTALL_DIR=share/${PORT}
    -DH5Support_SKIP_INSTALL_FILES=OFF
    -DHDF5_STATUS_PRINTED=ON
  MAYBE_UNUSED_VARIABLES
    CMP_HDF5_ENABLE_COPY
    CMP_HDF5_ENABLE_INSTALL
)

vcpkg_install_cmake()

vcpkg_fixup_cmake_targets()

file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug")
