package("cpp-channel")
    set_kind("library", {headeronly = true})
    set_homepage("https://github.com/andreiavrammsd/cpp-channel")
    set_description("Thread-safe container for sharing data between threads")
    set_license("MIT")

    add_urls("https://github.com/andreiavrammsd/cpp-channel/archive/refs/tags/$(version).zip",
             "https://github.com/andreiavrammsd/cpp-channel.git")

    add_versions("v1.3.1", "16b1b8d38ef78b35ec99bfb49ae2664181261f9319d1dd09d483d62feee80a2d")
    add_versions("v0.8.3", "095102dd7be6a2087206fc22ec2e32b4eb687f25f8d57d36355290ffb203e4d7")
    add_versions("v0.8.2", "36f234c40d59b90356d37b558a8918a86b128030ad5d42d8c6a627cfe81c8624")

    on_install(function (package)
        os.cp("include", package:installdir())
    end)

    on_test(function (package)
        assert(package:check_cxxsnippets({test = [[
            void test() {
                msd::channel<int> chan;
            }
        ]]}, {configs = {languages = "c++11"}, includes = "msd/channel.hpp"}))
    end)
