Skip to content

Commit

Permalink
im3d: add package (#2432)
Browse files Browse the repository at this point in the history
  • Loading branch information
star-hengxing authored Aug 13, 2023
1 parent e882990 commit a12fde2
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions packages/i/im3d/xmake.lua
Original file line number Diff line number Diff line change
@@ -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 <im3d.h>
void test() {
Im3d::PushDrawState();
Im3d::SetSize(2.0f);
}
]]}, {configs = {languages = "c++11"}}))
end)

0 comments on commit a12fde2

Please sign in to comment.