aboutsummaryrefslogtreecommitdiff
path: root/xmake.lua
blob: 7f04421f79490535c31e20d54f1dbb5c8624db79 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
add_requires(
    "vcpkg::doctest", 
    "vcpkg::spdlog", 
    "vcpkg::gsl-lite", 
    "vcpkg::asio", 
    "vcpkg::cpr", 
    "vcpkg::xxhash", 
    "vcpkg::robin-map", 
    "vcpkg::lz4", 
    "vcpkg::fmt", 
    "vcpkg::cxxopts", 
    "vcpkg::mimalloc", 
    "vcpkg::sol2", 
    "vcpkg::sentry-native", 
    "vcpkg::json11",
    "vcpkg::lua", 
    "vcpkg::curl", 
    "vcpkg::zlib", 
    "vcpkg::zstd", 
    "vcpkg::http-parser")

add_rules("mode.debug", "mode.release")

if is_mode("release") then
    set_optimize("smallest")
    if is_plat("windows") then
        add_ldflags("/LTCG")
    end
end

if is_mode("debug") then
    add_defines("DEBUG")
end

add_defines("UNICODE", "_CONSOLE")

set_warnings("allextra", "error")
set_languages("cxx20")

set_symbols("debug")

add_packages(
    "vcpkg::cxxopts",
    "vcpkg::mimalloc")

includes("zencore/xmake.lua")
includes("zencore-test/xmake.lua")
includes("zenstore/xmake.lua")
includes("zenutil/xmake.lua")
includes("zenserver/xmake.lua")
includes("zenserver-test/xmake.lua")
includes("zen/xmake.lua")