2023-04-29 23:38:26 +08:00
|
|
|
add_requires("libxml2", {optional = true})
|
|
|
|
|
|
|
|
|
|
target("libui-xml")
|
2026-11-19 21:56:04 +08:00
|
|
|
set_version("1.0.0")
|
2023-04-29 23:38:26 +08:00
|
|
|
add_packages("libxml2")
|
|
|
|
|
if has_package("libxml2") then
|
|
|
|
|
set_configvar("LIBUI_XML_HAS_LIBXML2", 1)
|
|
|
|
|
end
|
|
|
|
|
set_kind("$(kind)")
|
|
|
|
|
add_files("src/**.c")
|
|
|
|
|
add_deps("yutil", "libui", "libcss", "pandagl")
|
|
|
|
|
set_configdir("include/ui_xml")
|
|
|
|
|
add_configfiles("src/config.h.in")
|
|
|
|
|
add_headerfiles("include/ui_xml.h", "include/(ui_xml/*.h)")
|
|
|
|
|
if is_kind("static") then
|
|
|
|
|
set_configvar("LIBUI_XML_STATIC_BUILD", 1)
|
|
|
|
|
elseif is_plat("windows") then
|
|
|
|
|
add_defines("LIBUI_XML_DLL_EXPORT")
|
|
|
|
|
end
|
2026-05-23 18:46:07 +08:00
|
|
|
|
|
|
|
|
target("libui-xml-tests")
|
|
|
|
|
set_default(false)
|
|
|
|
|
set_kind("binary")
|
|
|
|
|
set_group("tests")
|
|
|
|
|
set_rundir("tests/fixtures")
|
2026-11-24 21:24:55 +08:00
|
|
|
add_files("tests/*.c")
|
2026-05-23 18:46:07 +08:00
|
|
|
add_deps("ctest", "libui-xml")
|
|
|
|
|
add_rules("tests.runnable")
|
|
|
|
|
add_tests("default", {group = "tests"})
|