vcpkg_from_github(
    OUT_SOURCE_PATH SOURCE_PATH
    REPO ThePhD/sol2
    REF a7da2a8e889498b0c5a4ed6d9e3463af02bb6102
    SHA512 e40a705b77ac752729352c59c56770d0832269cc94eaf13bd023d43f802dd908727db5b85fa8ddd4576f026905d3ca34910b12da77b2b7c49f6d5bcfa46f1202
    HEAD_REF develop
)

vcpkg_configure_cmake(
    SOURCE_PATH ${SOURCE_PATH}
    PREFER_NINJA
)

vcpkg_install_cmake()
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/sol2)
vcpkg_copy_pdbs()

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

# Handle copyright
configure_file(${SOURCE_PATH}/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY)
