From cfa65434f1e4fc187e159f9aa94cae00bbe7818c Mon Sep 17 00:00:00 2001 From: ruki Date: Wed, 25 Jan 2023 21:04:10 +0800 Subject: [PATCH] add mathfu (#1755) --- packages/m/mathfu/xmake.lua | 23 +++++++++++++++++++++++ packages/v/vectorial/xmake.lua | 21 +++++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 packages/m/mathfu/xmake.lua create mode 100644 packages/v/vectorial/xmake.lua diff --git a/packages/m/mathfu/xmake.lua b/packages/m/mathfu/xmake.lua new file mode 100644 index 000000000..8297ed15b --- /dev/null +++ b/packages/m/mathfu/xmake.lua @@ -0,0 +1,23 @@ +package("mathfu") + set_kind("library", {headeronly = true}) + set_homepage("http://google.github.io/mathfu") + set_description("C++ math library developed primarily for games focused on simplicity and efficiency.") + set_license("Apache-2.0") + + add_urls("https://github.com/google/mathfu.git") + add_versions("2022.5.10", "da23a1227bb65fbb7f2f5b6c504fbbdd1dfdab4b") + + add_deps("vectorial") + + on_install(function (package) + os.cp("include", package:installdir()) + end) + + on_test(function (package) + assert(package:check_cxxsnippets({test = [[ + #include "mathfu/vector.h" + void test() { + mathfu::Vector vector; + } + ]]}, {configs = {languages = "c++11"}})) + end) diff --git a/packages/v/vectorial/xmake.lua b/packages/v/vectorial/xmake.lua new file mode 100644 index 000000000..2946a2f41 --- /dev/null +++ b/packages/v/vectorial/xmake.lua @@ -0,0 +1,21 @@ +package("vectorial") + set_kind("library", {headeronly = true}) + set_homepage("https://github.com/scoopr/vectorial") + set_description("Vector math library with NEON/SSE support") + + add_urls("https://github.com/scoopr/vectorial.git") + add_versions("2019.06.28", "3a00e8c00d017cb49b12eeffd7464246d172ea97") + + on_install(function (package) + os.cp("include", package:installdir()) + end) + + on_test(function (package) + assert(package:check_cxxsnippets({test = [[ + #include "vectorial/simd4f.h" + void test() { + simd4f a = simd4f_create(1,2,3,4); + simd4f x = simd4f_sum(a); + } + ]]}, {configs = {languages = "c++11"}})) + end)