|
|
@ -7,14 +7,21 @@ package("iguana") |
|
|
|
add_urls("https://github.com/qicosmos/iguana/archive/refs/tags/$(version).tar.gz", |
|
|
|
add_urls("https://github.com/qicosmos/iguana/archive/refs/tags/$(version).tar.gz", |
|
|
|
"https://github.com/qicosmos/iguana.git") |
|
|
|
"https://github.com/qicosmos/iguana.git") |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
add_versions("1.0.4", "b584cd26e65902a14a3a349ebc480beb7b4502fd5a5ffa3cb7c6102d857958b1") |
|
|
|
add_versions("v1.0.3", "7dcb21a36bd64a63a9ea857f3563ac61e965c49ec60ad7b99a2bfb9192f3e4c3") |
|
|
|
add_versions("v1.0.3", "7dcb21a36bd64a63a9ea857f3563ac61e965c49ec60ad7b99a2bfb9192f3e4c3") |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
add_deps("frozen") |
|
|
|
|
|
|
|
|
|
|
|
on_install(function (package) |
|
|
|
on_install(function (package) |
|
|
|
os.cp("iguana", package:installdir("include")) |
|
|
|
os.vcp("iguana", package:installdir("include")) |
|
|
|
os.cp("frozen", package:installdir("include")) |
|
|
|
|
|
|
|
end) |
|
|
|
end) |
|
|
|
|
|
|
|
|
|
|
|
on_test(function (package) |
|
|
|
on_test(function (package) |
|
|
|
|
|
|
|
local languages = "c++17" |
|
|
|
|
|
|
|
if package:is_plat("windows") and package:is_arch("arm.*") then |
|
|
|
|
|
|
|
languages = "c++20" |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
assert(package:check_cxxsnippets({test = [[ |
|
|
|
assert(package:check_cxxsnippets({test = [[ |
|
|
|
#include <iguana/json_reader.hpp> |
|
|
|
#include <iguana/json_reader.hpp> |
|
|
|
struct some_obj { |
|
|
|
struct some_obj { |
|
|
@ -27,6 +34,5 @@ package("iguana") |
|
|
|
std::string_view str = "{\"name\":\"tom\", \"age\":20}"; |
|
|
|
std::string_view str = "{\"name\":\"tom\", \"age\":20}"; |
|
|
|
iguana::from_json(obj, str); |
|
|
|
iguana::from_json(obj, str); |
|
|
|
} |
|
|
|
} |
|
|
|
]]}, {configs = {languages = "c++17"}})) |
|
|
|
]]}, {configs = {languages = languages}})) |
|
|
|
end) |
|
|
|
end) |
|
|
|
|
|
|
|
|
|
|
|