-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathxmake.lua
More file actions
31 lines (25 loc) · 1.15 KB
/
xmake.lua
File metadata and controls
31 lines (25 loc) · 1.15 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
-- xmake.lua
add_rules("mode.debug", "mode.release", "mode.releasedbg")
-- Basics
set_languages("c++20", "c99")
set_rundir(".")
add_includedirs("Sources", "Sources/ThirdParty", { public = true })
-- Platform defines
if is_plat("windows") then
add_defines("TRMN_WINDOWS", { public = true })
elseif is_plat("linux") then
add_defines("TRMN_LINUX", { public = true })
add_rpathdirs("Binaries/Linux", "$(builddir)/$(plat)/$(arch)/$(mode)/", { public = true })
add_cflags("-fPIC", { public = true })
add_cxxflags("-fPIC", { public = true })
elseif is_plat("macosx") then
add_defines("TRMN_MACOS", { public = true })
add_cflags("-x objective-c", "-fno-objc-arc", { public = true })
add_cxxflags("-x objective-c++", "-fno-objc-arc", { public = true })
add_mflags("-fno-objc-arc", { public = true })
add_rpathdirs("Binaries/Mac", "$(builddir)/$(plat)/$(arch)/$(mode)/", { public = true })
add_links("Binaries/Mac/libmetalirconverter.dylib", { public = true })
end
-- Other defines
add_defines("GLM_FORCE_DEPTH_ZERO_TO_ONE", "VK_NO_PROTOTYPES", "GLM_ENABLE_EXPERIMENTAL", "JPH_DEBUG_RENDERER", { public = true })
includes("Sources")