From a12fde263310e063c03c4c40e02247e7e56bce8b Mon Sep 17 00:00:00 2001 From: star9029 Date: Sun, 13 Aug 2023 08:12:36 +0800 Subject: [PATCH] im3d: add package (#2432) --- packages/i/im3d/xmake.lua | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 packages/i/im3d/xmake.lua diff --git a/packages/i/im3d/xmake.lua b/packages/i/im3d/xmake.lua new file mode 100644 index 00000000000..7602103d27f --- /dev/null +++ b/packages/i/im3d/xmake.lua @@ -0,0 +1,33 @@ +package("im3d") + set_homepage("https://github.com/john-chapman/im3d") + set_description("File Dialog for Dear ImGui") + set_license("MIT") + + add_urls("https://github.com/john-chapman/im3d.git") + + add_versions("2023.06.09", "d03941725fd0bd08c78c46e3e5b0265526e9d060") + + on_install(function (package) + io.writefile("xmake.lua", [[ + add_rules("mode.debug", "mode.release") + target("im3d") + set_kind("$(kind)") + set_languages("c++11") + add_files("im3d.cpp") + add_headerfiles("im3d.h", "im3d_config.h", "im3d_math.h") + if is_plat("windows") and is_kind("shared") then + add_rules("utils.symbols.export_all", {export_classes = true}) + end + ]]) + import("package.tools.xmake").install(package) + end) + + on_test(function (package) + assert(package:check_cxxsnippets({test = [[ + #include + void test() { + Im3d::PushDrawState(); + Im3d::SetSize(2.0f); + } + ]]}, {configs = {languages = "c++11"}})) + end)