|
|
|
@ -4,11 +4,36 @@ package("flux") |
|
|
|
|
set_description("A C++20 library for sequence-orientated programming") |
|
|
|
|
set_license("BSL-1.0") |
|
|
|
|
|
|
|
|
|
add_urls("https://github.com/tcbrindle/flux.git") |
|
|
|
|
add_versions("2023.08.17", "8434e8e0fd131cebc3aed0d845530335bf7fb5e1") |
|
|
|
|
add_urls("https://github.com/tcbrindle/flux/archive/refs/tags/$(version).tar.gz", |
|
|
|
|
"https://github.com/tcbrindle/flux.git") |
|
|
|
|
|
|
|
|
|
add_versions("v0.4.0", "95e7d9d71c9ee9e89bb24b46ccba77ddfb0a1580630c2faab0b415dacc7c8d56") |
|
|
|
|
|
|
|
|
|
add_deps("cmake") |
|
|
|
|
|
|
|
|
|
if on_check then |
|
|
|
|
on_check("android", function (package) |
|
|
|
|
local ndk = package:toolchain("ndk") |
|
|
|
|
local ndkver = ndk:config("ndkver") |
|
|
|
|
local ndk_sdkver = ndk:config("ndk_sdkver") |
|
|
|
|
assert(ndkver and tonumber(ndkver) > 22, "package(flux) require ndk version > 22") |
|
|
|
|
assert(ndk_sdkver and tonumber(ndk_sdkver) >= 24, "package(flux) require ndk api >= 24") |
|
|
|
|
end) |
|
|
|
|
|
|
|
|
|
on_check("windows", function (package) |
|
|
|
|
local vs_toolset = package:toolchain("msvc"):config("vs_toolset") |
|
|
|
|
if vs_toolset then |
|
|
|
|
local vs_toolset_ver = import("core.base.semver").new(vs_toolset) |
|
|
|
|
local minor = vs_toolset_ver:minor() |
|
|
|
|
assert(minor and minor >= 30, "package(flux) require vs_toolset >= 14.3") |
|
|
|
|
end |
|
|
|
|
end) |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
on_install(function (package) |
|
|
|
|
os.cp("include", package:installdir()) |
|
|
|
|
local configs = {"-DFLUX_BUILD_EXAMPLES=OFF", "-DFLUX_BUILD_TESTS=OFF"} |
|
|
|
|
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:is_debug() and "Debug" or "Release")) |
|
|
|
|
import("package.tools.cmake").install(package, configs) |
|
|
|
|
end) |
|
|
|
|
|
|
|
|
|
on_test(function (package) |
|
|
|
|