include(vcpkg_common_functions)
vcpkg_from_github(
    OUT_SOURCE_PATH SOURCE_PATH
    REPO bfgroup/Lyra
    REF 1.2
    SHA512 45314c0b285ee9cbe94bd9374434bea2155f9b9f347625589b54ccb575123c1dd1155a7ae1a86f7ef612dc58edbe3dda945986c8c6cdaf441cf7dcb05fc1a533
    HEAD_REF master
)

file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
file(INSTALL ${SOURCE_PATH}/include/lyra DESTINATION ${CURRENT_PACKAGES_DIR}/include)
file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/FindLyra.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/cmake)

vcpkg_test_cmake(PACKAGE_NAME Lyra MODULE REQUIRED_HEADER lyra/lyra.hpp TARGETS BFG::Lyra)
