mirror of
https://github.com/lc-soft/LCUI.git
synced 2026-11-30 16:48:21 +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.
28 lines
758 B
Lua
28 lines
758 B
Lua
target("libthread")
|
|
set_version("1.0.0")
|
|
set_kind("$(kind)")
|
|
add_files("src/*.c")
|
|
set_configdir("include")
|
|
add_configfiles("src/thread.h.in")
|
|
add_headerfiles("include/thread.h")
|
|
if not is_plat("windows") then
|
|
add_syslinks("pthread", "dl")
|
|
end
|
|
add_deps("yutil")
|
|
if is_kind("static") then
|
|
set_configvar("LIBTHREAD_STATIC_BUILD", 1)
|
|
elseif is_plat("windows") then
|
|
add_defines("LIBTHREAD_DLL_EXPORT")
|
|
end
|
|
|
|
target("libthread-tests")
|
|
set_default(false)
|
|
set_kind("binary")
|
|
set_group("tests")
|
|
set_rundir("tests")
|
|
add_files("tests/main.c", "tests/test_thread.c")
|
|
add_deps("ctest", "libthread")
|
|
add_rules("tests.runnable")
|
|
add_tests("default", {group = "tests"})
|
|
|