Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 31 additions & 4 deletions packages/e/eve/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,41 @@ package("eve")
set_description("Expressive Vector Engine - SIMD in C++ Goes Brrrr")
set_license("BSL-1.0")

add_urls("https://github.com/jfalcou/eve/archive/refs/tags/v$(version).tar.gz", {excludes = {"*.paxheader", "*.data"}})
add_urls("https://github.com/jfalcou/eve.git")
add_versions("v2025.09.01", "b777741e9e9aa2902f91a2022d643db57b7d2de6")

add_versions("2023.02.15", "7a5fb59c0e6ef3bef3e8b36d62e138d31e7f2a9f1bdfe95a8e96512b207f84c5")
add_deps("cmake")

if on_check then
on_check(function (package)
if package:is_plat("windows") and package:has_tool("cxx", "cl") then
raise("package(eve) unsupported msvc toolchain now, you can use clang toolchain\nadd_requires(\"eve\", {configs = {toolchains = \"clang-cl\"}}))")
elseif package:is_plat("android") then
local ndk = package:toolchain("ndk"):config("ndkver")
assert(ndk and tonumber(ndk) > 22, "package(eve) require ndk version > 22")
end

if package:has_tool("cxx", "gcc") then
assert(package:check_cxxsnippets({test = [[
#if defined(__GNUC__) && !defined(__clang__)
# if (__GNUC__ < 13)
# error "package(eve) require gcc >13"
# endif
#endif
]]}, {configs = {languages = "c++20"}}), "package(eve) require gcc >13")
end
end)
end

on_install(function (package)
print(os.filedirs("*"))
os.cp("include", package:installdir())
io.replace("cmake/config/eve-install.cmake", [[set(MAIN_DEST "${CMAKE_INSTALL_LIBDIR}/eve-${PROJECT_VERSION}")]], [[set(MAIN_DEST "${CMAKE_INSTALL_LIBDIR}/eve")]], {plain = true})
io.replace("cmake/config/eve-install.cmake", [[set(INSTALL_DEST "${CMAKE_INSTALL_INCLUDEDIR}/eve-${PROJECT_VERSION}")]], [[set(INSTALL_DEST "${CMAKE_INSTALL_INCLUDEDIR}")]], {plain = true})
io.replace("cmake/config/eve-install.cmake", [[set(DOC_DEST "${CMAKE_INSTALL_DOCDIR}-${PROJECT_VERSION}")]], [[set(DOC_DEST "${CMAKE_INSTALL_DOCDIR}")]], {plain = true})

local configs = {"-DEVE_BUILD_TEST=OFF"}
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:is_debug() and "Debug" or "Release"))
table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF"))
import("package.tools.cmake").install(package, configs)
end)

on_test(function (package)
Expand Down
Loading