-
-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathxmake.lua
45 lines (34 loc) · 877 Bytes
/
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
-- project
set_project("benchbox")
-- version
set_version("1.0.1")
set_xmakever("2.2.5")
-- set warning all as error
set_warnings("all")
-- set language: c99, c++11
set_languages("c99", "cxx11")
-- add rules: debug/release
add_rules("mode.debug", "mode.release")
-- for the windows platform (msvc)
if is_plat("windows") then
-- link libcmt.lib
add_cxflags("-MT")
-- no msvcrt.lib
add_ldflags("-nodefaultlib:\"msvcrt.lib\"")
end
-- add syslinks
if is_plat("windows") then
add_syslinks("ws2_32")
elseif is_plat("android") then
add_syslinks("m", "c")
elseif is_plat("mingw") then
add_syslinks("ws2_32", "pthread", "m")
else
add_syslinks("pthread", "dl", "m", "c")
end
-- add requires
add_requires("tbox", {configs = {coroutine = true}})
-- add repositories
add_repositories("benchbox-repo repo")
-- include sources
includes("src")