aboutsummaryrefslogtreecommitdiff
path: root/thirdparty/xmake.lua
blob: f1201c02e80ce03f58cb8be07b688c393b5afed7 (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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
target('utfcpp')
    set_kind("headeronly")
    set_group("thirdparty")
    add_headerfiles("utfcpp/**.h")
    add_includedirs("utfcpp/source", {public=true})

target('oodle')
    set_kind('headeronly')
    set_group("thirdparty")
    add_includedirs("Oodle/include", {public=true})
    if is_os("windows") then
        add_linkdirs("Oodle/lib/Win64", {public=true})
        add_links("oo2core_win64", {public=true})
    elseif is_os("linux") then
        add_linkdirs("Oodle/lib/Linux_x64", {public=true})
        add_links("oo2corelinux64", {public=true})
        add_syslinks("pthread", {public=true})
    elseif is_os("macosx") then
        add_linkdirs("Oodle/lib/Mac_x64", {public=true})
        add_links("oo2coremac64", {public=true})
    end

target('timesinceprocessstart')
    set_kind('headeronly')
    set_group('thirdparty')
    add_includedirs("GetTimeSinceProcessStart", {public=true})
    add_headerfiles("GetTimeSinceProcessStart/**.h")

target('ue-trace')
    set_kind('headeronly')
    set_group('thirdparty')
    add_includedirs("trace", {public=true})
    add_headerfiles("trace/**.h")

target('rpmalloc')
    set_kind("static")
    set_group('thirdparty')
    set_languages("c17", "cxx20")
    if is_os("windows") then
        add_cflags("/experimental:c11atomics")
    end
    add_defines("RPMALLOC_FIRST_CLASS_HEAPS=1", "ENABLE_STATISTICS=1", "ENABLE_OVERRIDE=0")
    add_files("rpmalloc/rpmalloc.c")
    add_headerfiles("rpmalloc/**.h")
    add_includedirs("rpmalloc", {public=true})

target('protozero')
    set_kind('headeronly')
    set_group('thirdparty')
    add_headerfiles("protozero/**.hpp")
    add_includedirs("protozero/include", {public=true})

target('spdlog')
    set_kind('headeronly')
    set_group('thirdparty')
    add_headerfiles("spdlog/*.h")
    add_includedirs("spdlog/include", {public=true})

target('cpr')
    set_kind('static')
    set_group('thirdparty')
    set_languages("cxx20")
    add_files("cpr/cpr/*.cpp")
    add_headerfiles("cpr/include/*.h")
    add_includedirs("cpr/include", {public=true})
    if is_os("windows") then
        add_cxxflags("/wd4668")
    else
        add_cxxflags("-Wno-undef")
    end
    add_packages("vcpkg::curl",
        "vcpkg::openssl", -- required by curl
        "vcpkg::zlib"  -- required by curl
    )

target('asio')
    set_kind('headeronly')
    set_group('thirdparty')
    add_defines("ASIO_STANDLONE", "ASIO_HEADER_ONLY", {public=true})
    add_headerfiles("asio/asio/include/**.hpp")
    add_includedirs("asio/asio/include", {public=true})