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.
57 lines
1.4 KiB
Lua
57 lines
1.4 KiB
Lua
set_warnings("all", "error")
|
|
|
|
-- disable some compiler errors
|
|
add_cxflags("-Wno-error=deprecated-declarations", "-fno-strict-aliasing", "-Wno-error=expansion-to-defined")
|
|
|
|
-- add build modes
|
|
add_rules("mode.release", "mode.debug")
|
|
|
|
add_defines("_UNICODE", "YUTIL_EXPORTS")
|
|
|
|
if is_plat("windows") then
|
|
add_defines("_CRT_SECURE_NO_WARNINGS")
|
|
end
|
|
|
|
if is_mode("release") then
|
|
set_symbols("none")
|
|
end
|
|
|
|
-- 'xmake f --optionname=test'
|
|
option("yutil_test")
|
|
set_default(true)
|
|
set_showmenu(true)
|
|
set_category("test")
|
|
set_description("Enable or disable yutil_test option")
|
|
option_end()
|
|
|
|
-- include project sources
|
|
includes("tests")
|
|
|
|
target("yutil")
|
|
set_version("1.0.0")
|
|
-- make as a static/shared library
|
|
set_kind("$(kind)")
|
|
if is_kind("shared") then
|
|
-- export all symbols for windows/dll
|
|
if is_plat("windows") then
|
|
if is_mode("release") then
|
|
set_optimize("fastest")
|
|
end
|
|
add_rules("utils.symbols.export_all")
|
|
end
|
|
else
|
|
set_configvar("YUTIL_STATIC_BUILD", 1)
|
|
end
|
|
|
|
-- add include directories
|
|
add_includedirs("include", {public = true})
|
|
|
|
-- add the header files for installing
|
|
add_headerfiles("include/yutil.h")
|
|
add_headerfiles("include/(yutil/*.h)")
|
|
set_configdir("include/yutil")
|
|
add_configfiles("include/yutil/config.h.in")
|
|
|
|
-- add the common source files
|
|
add_files("src/*.c")
|