|
|
|
@ -6,15 +6,24 @@ package("nanovg") |
|
|
|
|
|
|
|
|
|
add_urls("https://github.com/memononen/nanovg.git") |
|
|
|
|
|
|
|
|
|
add_versions("2021.11.2", "e75cf72b4ad0b850a66e589d14d7b3156065dd2a") |
|
|
|
|
|
|
|
|
|
on_install("windows", "macosx", "linux", function (package) |
|
|
|
|
io.writefile("xmake.lua", [[ |
|
|
|
|
add_rules("mode.debug", "mode.release") |
|
|
|
|
target("nanovg") |
|
|
|
|
set_kind("static") |
|
|
|
|
set_kind("$(kind)") |
|
|
|
|
add_files("src/*.c") |
|
|
|
|
add_headerfiles("src/(*.h)") |
|
|
|
|
if is_plat("windows") and is_kind("shared") then |
|
|
|
|
add_rules("utils.symbols.export_all") |
|
|
|
|
end |
|
|
|
|
]]) |
|
|
|
|
import("package.tools.xmake").install(package) |
|
|
|
|
local configs = {} |
|
|
|
|
if package:config("shared") then |
|
|
|
|
configs.kind = "shared" |
|
|
|
|
end |
|
|
|
|
import("package.tools.xmake").install(package, configs) |
|
|
|
|
end) |
|
|
|
|
|
|
|
|
|
on_test(function (package) |
|
|
|
|