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.

29 lines
1.1 KiB

package("arduinojson")
set_kind("library", {headeronly = true})
set_homepage("https://arduinojson.org")
set_description("📟 JSON library for Arduino and embedded C++. Simple and efficient.")
set_license("MIT")
add_urls("https://github.com/bblanchon/ArduinoJson/archive/refs/tags/$(version).tar.gz",
"https://github.com/bblanchon/ArduinoJson.git")
add_versions("v7.0.3", "6da2d069e0caa0c829444912ee13e78bdf9cc600be632428a164c92e69528000")
add_versions("v6.21.4", "9551af9282372f6e64cf4009fc43be7f2df6eb96fe9c0aab44d4eed217d09747")
add_deps("cmake")
on_install(function (package)
import("package.tools.cmake").install(package, {"-DBUILD_TESTING=OFF"})
end)
on_test(function (package)
assert(package:check_cxxsnippets({test = [[
#include <ArduinoJson.h>
void test() {
char json[] = "{\"sensor\":\"gps\",\"time\":1351824120,\"data\":[48.756080,2.302038]}";
DynamicJsonDocument doc(1024);
deserializeJson(doc, json);
}
]]}, {configs = {languages = "c++11"}}))
end)