diff options
| -rw-r--r-- | xmake.lua | 6 | ||||
| -rw-r--r-- | zencore/xmake.lua | 6 |
2 files changed, 9 insertions, 3 deletions
@@ -1,9 +1,9 @@ -- Copyright Epic Games, Inc. All Rights Reserved. set_configvar("ZEN_SCHEMA_VERSION", 3) -- changed cas oplog format (p3rl) -local zenversion = os.getenv("ZEN_VERSION") or "0.0.0" -zenversion = string.gsub(zenversion, "^v", "") -set_version(zenversion, { build = "%Y%m%d%H%M" }) +-- local zenversion = os.getenv("ZEN_VERSION") or "0.0.0" +-- zenversion = string.gsub(zenversion, "^v", "") +-- set_version(zenversion, { build = "%Y%m%d%H%M" }) add_requires( "vcpkg::asio", diff --git a/zencore/xmake.lua b/zencore/xmake.lua index 63e874ac5..1e7a06080 100644 --- a/zencore/xmake.lua +++ b/zencore/xmake.lua @@ -4,6 +4,12 @@ target('zencore') set_kind("static") add_headerfiles("**.h") add_configfiles("include/zencore/config.h.in") + add_configfiles("VERSION.txt", {onlycopy = true}) + on_load(function (target) + local version = io.readfile("VERSION.txt") + version = version:match'^%s*v(.*%S)' or '' + target:set("version", version, { build = "%Y%m%d%H%M" }) + end) set_configdir("include/zencore") add_files("**.cpp") add_includedirs("include", {public=true}) |