-
Notifications
You must be signed in to change notification settings - Fork 0
/
xmake.lua
97 lines (70 loc) · 2.08 KB
/
xmake.lua
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
add_rules("mode.debug", "mode.minsizerel")
set_policy("build.ccache", false)
set_languages("c17", "cxx20")
set_exceptions("cxx")
set_runtimes(is_mode("debug") and "MTd" or "MT")
if is_mode("bin") then
add_defines("DEBUG")
set_symbols("debug")
set_optimize("none")
end
target("liblua")
set_kind("static")
add_includedirs("3rd/lua")
add_defines("MAKE_LIB")
add_files("3rd/lua/onelua.c")
target("luasocket-core")
set_kind("shared")
add_deps("liblua")
add_includedirs("3rd/Lua")
add_defines("WIN32", "NDEBUG", "_WINDOWS", "_USRDLL", "_CRT_SECURE_NO_WARNINGS", "_WINDLL", "LUASOCKET_")
add_includedirs("3rd/luasocket")
local src = "3rd/luasocket/src/"
add_files(src.."luasocket.c")
add_files(src.."timeout.c")
add_files(src.."buffer.c")
add_files(src.."io.c")
add_files(src.."auxiliar.c")
add_files(src.."compat.c")
add_files(src.."options.c")
add_files(src.."inet.c")
add_files(src.."except.c")
add_files(src.."select.c")
add_files(src.."tcp.c")
add_files(src.."udp.c")
if is_os("windows") then
add_files(src.."wsocket.c")
add_syslinks("ws2_32")
end
target("luasocket-mime")
set_kind("shared")
add_deps("liblua")
add_includedirs("3rd/Lua")
add_defines("WIN32", "NDEBUG", "_WINDOWS", "_USRDLL", "_CRT_SECURE_NO_WARNINGS", "_WINDLL", "LUASOCKET_")
add_includedirs("3rd/luasocket")
add_files(src.."mime.c")
add_files(src.."compat.c")
-- don't make it
-- target("lua")
-- set_kind("binary")
-- add_deps("liblua")
-- add_includedirs("3rd/Lua")
-- add_files("3rd/lua/lua.c")
target("x64dbglua")
if is_mode("bin") then
set_kind("binary")
add_defines("BIN=1")
else
set_kind("shared")
end
add_deps("liblua")
add_includedirs("3rd/Lua")
add_includedirs("3rd/sol2/include")
add_includedirs("3rd")
add_linkdirs("3rd")
add_syslinks("user32")
add_syslinks("Comdlg32")
add_defines("UNICODE", "_UNICODE")
add_defines("SOL_ALL_SAFETIES_ON=1")
-- add files
add_files("src/*.cpp")