mirror of
https://github.com/lc-soft/LCUI.git
synced 2026-12-01 16:56:34 +01:00
versions.json is now the single source of truth; scripts/sync-versions.mjs keeps xmake descriptors, tracked version headers and package.json in sync. Sub-library versions are aligned with the published 1.0.0 packages. C11 is set at the project level, and _GNU_SOURCE is defined on POSIX so strict C11 still exposes clock_gettime, strdup and recursive pthread mutexes.
30 lines
916 B
Lua
30 lines
916 B
Lua
add_requires("libxml2", {optional = true})
|
|
|
|
target("libui-xml")
|
|
set_version("1.0.0")
|
|
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
|
|
|
|
target("libui-xml-tests")
|
|
set_default(false)
|
|
set_kind("binary")
|
|
set_group("tests")
|
|
set_rundir("tests/fixtures")
|
|
add_files("tests/main.c", "tests/test_xml_parser.c")
|
|
add_deps("ctest", "libui-xml")
|
|
add_rules("tests.runnable")
|
|
add_tests("default", {group = "tests"})
|