-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathxmake.lua
More file actions
48 lines (43 loc) · 1.16 KB
/
xmake.lua
File metadata and controls
48 lines (43 loc) · 1.16 KB
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
add_rules("mode.debug", "mode.release")
add_repositories("sculk-repo https://github.com/SculkCatalystMC/xmake-repo.git")
add_requires("jsonc v1.4.0")
add_requires("boost_pfr 2.2.0")
add_requires("magic_enum 0.9.7")
if is_plat("windows") then
if not has_config("vs_runtime") then
set_runtimes("MD")
end
set_toolchains("msvc")
else
set_toolchains("clang")
end
target("test")
set_kind("binary")
set_languages("c++23")
add_packages(
"jsonc",
"boost_pfr",
"magic_enum"
)
add_includedirs(
"include",
"test"
)
add_files("test/**.cpp")
if is_plat("windows") then
add_defines(
"NOMINMAX",
"UNICODE"
)
add_cxflags("/utf-8", "/W4")
else
add_cxflags("-Wall", "-Wextra", "-stdlib=libc++")
add_syslinks("c++")
end
after_build(function (target)
local file = target:targetfile()
local output_dir = path.join(os.projectdir(), "bin")
os.mkdir(output_dir)
os.cp(file, output_dir)
cprint("${bright green}[Execuatble]: ${reset}Execuatble file already generated to " .. output_dir)
end)