include(vcpkg_common_functions)
set(ARISTO_VERSION 0.8.1)
set(MASTER_COPY_SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src)

file(READ "${VCPKG_ROOT_DIR}/_env/EXTERNAL_ARISTO_URLS.txt" EXTERNAL_ARISTO_URLS)
file(READ "${VCPKG_ROOT_DIR}/_env/EXTERNAL_ARISTO_SHA512.txt" EXTERNAL_ARISTO_SHA512)

if (WIN32)
    vcpkg_download_distfile(
        ARISTO_SOURCE_ARCHIVE
        URLS ${EXTERNAL_ARISTO_URLS}
        SHA512 ${EXTERNAL_ARISTO_SHA512}
        FILENAME aristo-0.8.1-windows.zip
    )

    vcpkg_extract_source_archive(${ARISTO_SOURCE_ARCHIVE})
    file(COPY ${MASTER_COPY_SOURCE_PATH}/aristo/include DESTINATION ${CURRENT_PACKAGES_DIR})
    file(COPY ${MASTER_COPY_SOURCE_PATH}/aristo/lib DESTINATION ${CURRENT_PACKAGES_DIR})
    file(COPY ${MASTER_COPY_SOURCE_PATH}/aristo/debug DESTINATION ${CURRENT_PACKAGES_DIR})
    file(COPY ${MASTER_COPY_SOURCE_PATH}/aristo/bin DESTINATION ${CURRENT_PACKAGES_DIR})
    file(COPY ${MASTER_COPY_SOURCE_PATH}/aristo/share DESTINATION ${CURRENT_PACKAGES_DIR})

endif ()
