From 5ea6130aa1aa9c82b8718a9600b79f1ef7e6e83a Mon Sep 17 00:00:00 2001 From: FranekStratovarius <32364106+FranekStratovarius@users.noreply.github.com> Date: Fri, 17 Jun 2022 10:30:22 +0200 Subject: [PATCH] create flecs package (#1271) --- packages/f/flecs/xmake.lua | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 packages/f/flecs/xmake.lua diff --git a/packages/f/flecs/xmake.lua b/packages/f/flecs/xmake.lua new file mode 100644 index 000000000..e88dbf0ab --- /dev/null +++ b/packages/f/flecs/xmake.lua @@ -0,0 +1,26 @@ +package("flecs") + + set_homepage("https://github.com/SanderMertens/flecs") + set_description("A fast entity component system (ECS) for C & C++") + set_license("MIT") + + add_urls("https://github.com/SanderMertens/flecs.git") + add_versions("v3.0.1-alpha", "9d9a2fbea143a7237ae7020748180d896839e328a5d34bb769808abf904fcbf0") + add_versions("v2.4.8", "8b24c11b0513ee6ad3904165ed0927d59cbff2acc9bce0f8f989f493891d7deb") + + add_deps("cmake") + + on_install("windows", "macosx", "linux", function (package) + local configs = {} + table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package: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) + assert(package:check_cxxsnippets({test = [[ + void test() { + flecs::world ecs; + } + ]]}, {configs = {languages = "c++11"}, includes = "flecs.h"})) + end) \ No newline at end of file