implot: add package (#2399)
parent
9e7f0e7de7
commit
90de07b1dc
1 changed files with 42 additions and 0 deletions
@ -0,0 +1,42 @@ |
|||||||
|
package("implot") |
||||||
|
set_homepage("https://github.com/epezent/implot") |
||||||
|
set_description("Immediate Mode Plotting") |
||||||
|
set_license("MIT") |
||||||
|
|
||||||
|
add_urls("https://github.com/epezent/implot/archive/refs/tags/$(version).tar.gz", |
||||||
|
"https://github.com/epezent/implot.git") |
||||||
|
|
||||||
|
add_versions("v0.15", "3df87e67a1e28db86828059363d78972a298cd403ba1f5780c1040e03dfa2672") |
||||||
|
|
||||||
|
add_deps("imgui") |
||||||
|
|
||||||
|
on_install("windows", "linux", "macosx", "mingw", "android", "iphoneos", function (package) |
||||||
|
local configs = {} |
||||||
|
io.writefile("xmake.lua", [[ |
||||||
|
add_requires("imgui") |
||||||
|
add_rules("mode.release", "mode.debug") |
||||||
|
target("implot") |
||||||
|
set_kind("$(kind)") |
||||||
|
set_languages("c++11") |
||||||
|
add_files("*.cpp|implot_demo.cpp") |
||||||
|
add_headerfiles("*.h") |
||||||
|
add_packages("imgui") |
||||||
|
if is_plat("windows") and is_kind("shared") then |
||||||
|
add_rules("utils.symbols.export_all", {export_classes = true}) |
||||||
|
end |
||||||
|
]]) |
||||||
|
if package:config("shared") then |
||||||
|
configs.kind = "shared" |
||||||
|
end |
||||||
|
import("package.tools.xmake").install(package, configs) |
||||||
|
end) |
||||||
|
|
||||||
|
on_test(function (package) |
||||||
|
assert(package:check_cxxsnippets({test = [[ |
||||||
|
#include <implot.h> |
||||||
|
void test() { |
||||||
|
ImPlot::CreateContext(); |
||||||
|
ImPlot::DestroyContext(); |
||||||
|
} |
||||||
|
]]}, {configs = {languages = "c++11"}})) |
||||||
|
end) |
Loading…
Reference in new issue