diff options
Diffstat (limited to 'src/zenserver/xmake.lua')
| -rw-r--r-- | src/zenserver/xmake.lua | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/src/zenserver/xmake.lua b/src/zenserver/xmake.lua index 6ee80dc62..f2ed17f05 100644 --- a/src/zenserver/xmake.lua +++ b/src/zenserver/xmake.lua @@ -2,7 +2,11 @@ target("zenserver") set_kind("binary") + if enable_unity then + add_rules("c++.unity_build", {batchsize = 4}) + end add_deps("zencore", + "zencompute", "zenhttp", "zennet", "zenremotestore", @@ -15,6 +19,12 @@ target("zenserver") add_files("**.cpp") add_files("frontend/*.zip") add_files("zenserver.cpp", {unity_ignored = true }) + + if is_plat("linux") and not (get_config("toolchain") or ""):find("clang") then + -- GCC false positives in deeply inlined code (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100137) + add_files("storage/projectstore/httpprojectstore.cpp", {force = {cxxflags = "-Wno-stringop-overflow"} }) + add_files("storage/storageconfig.cpp", {force = {cxxflags = "-Wno-array-bounds"} }) + end add_includedirs(".") set_symbols("debug") @@ -23,6 +33,8 @@ target("zenserver") add_packages("json11") add_packages("lua") add_packages("consul") + add_packages("oidctoken") + add_packages("nomad") if has_config("zenmimalloc") then add_packages("mimalloc") @@ -32,6 +44,14 @@ target("zenserver") add_packages("sentry-native") end + if has_config("zenhorde") then + add_deps("zenhorde") + end + + if has_config("zennomad") then + add_deps("zennomad") + end + if is_mode("release") then set_optimize("fastest") end @@ -141,4 +161,24 @@ target("zenserver") end copy_if_newer(path.join(installdir, "bin", consul_bin), path.join(target:targetdir(), consul_bin), consul_bin) end + + local oidctoken_pkg = target:pkg("oidctoken") + if oidctoken_pkg then + local installdir = oidctoken_pkg:installdir() + local oidctoken_bin = "OidcToken" + if is_plat("windows") then + oidctoken_bin = "OidcToken.exe" + end + copy_if_newer(path.join(installdir, "bin", oidctoken_bin), path.join(target:targetdir(), oidctoken_bin), oidctoken_bin) + end + + local nomad_pkg = target:pkg("nomad") + if nomad_pkg then + local installdir = nomad_pkg:installdir() + local nomad_bin = "nomad" + if is_plat("windows") then + nomad_bin = "nomad.exe" + end + copy_if_newer(path.join(installdir, "bin", nomad_bin), path.join(target:targetdir(), nomad_bin), nomad_bin) + end end) |