-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathxmake.lua
More file actions
39 lines (33 loc) · 1020 Bytes
/
xmake.lua
File metadata and controls
39 lines (33 loc) · 1020 Bytes
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
set_project("jsonmapper")
option("jsonmapper-build-example")
set_default(false)
set_showmenu(true)
option_end()
option("jsonmapper-use-bundled-rapidjson")
set_default(false)
set_showmenu(true)
option_end()
if not has_config("jsonmapper-use-bundled-rapidjson") then
add_requires("rapidjson")
end
target("jsonmapper")
set_kind("headeronly")
set_languages("cxx17")
add_includedirs("include", { interface = true })
if has_config("jsonmapper-use-bundled-rapidjson") then
add_includedirs("thirdparty/rapidjson/include", { interface = true })
else
add_packages("rapidjson", { public = true })
end
target_end()
if has_config("jsonmapper-build-example") then
for _, filepath in ipairs(os.files("example/*.cpp")) do
local targetName = path.basename(filepath)
target(targetName)
set_kind("binary")
set_languages("cxx20")
add_files(filepath)
add_deps("jsonmapper")
target_end()
end
end