package An official xmake package repository
https://xrepo.xmake.io/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
1010 B
28 lines
1010 B
3 years ago
|
package("mjson")
|
||
|
|
||
|
set_homepage("https://github.com/cesanta/mjson")
|
||
|
set_description("C/C++ JSON parser, emitter, JSON-RPC engine for embedded systems")
|
||
|
set_license("MIT")
|
||
|
|
||
|
add_urls("https://github.com/cesanta/mjson/archive/refs/tags/$(version).zip",
|
||
|
"https://github.com/cesanta/mjson.git")
|
||
|
add_versions("1.2.6", "d801348c38c883802a540eec0b3ea14318837084cbdd32bd83041d03a8850fe6")
|
||
|
|
||
|
add_configs("shared", {description = "Build shared library.", default = false, type = "boolean", readonly = true})
|
||
|
|
||
|
on_install(function (package)
|
||
|
os.cd("src")
|
||
|
io.writefile("xmake.lua", [[
|
||
|
add_rules("mode.debug", "mode.release")
|
||
|
target("mjson")
|
||
|
set_kind("static")
|
||
|
add_files("mjson.c")
|
||
|
add_headerfiles("mjson.h")
|
||
|
]])
|
||
|
import("package.tools.xmake").install(package)
|
||
|
end)
|
||
|
|
||
|
on_test(function (package)
|
||
|
assert(package:has_cfuncs("mjson_find", {includes = "mjson.h"}))
|
||
|
end)
|