This repository was archived by the owner on Jan 9, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpremake5.lua
More file actions
102 lines (77 loc) · 2.04 KB
/
Copy pathpremake5.lua
File metadata and controls
102 lines (77 loc) · 2.04 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
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
97
98
99
100
101
102
workspace "ck"
configurations { "Debug", "Release" }
platforms { "x86", "x86_64", "ARM", "ARM64" }
startproject "ck"
floatingpoint "Strict"
intrinsics "On"
stringpooling "On"
staticruntime "On"
filter "configurations:Debug"
symbols "On"
defines { "_DEBUG" }
--optimize "Debug"
optimize "Off"
sanitize { "Address" }
filter "configurations:Release"
optimize "Full"
omitframepointer "On"
flags { "LinktimeOptimization", "NoBufferSecurityCheck", "NoRuntimeChecks" }
filter "system:Windows"
systemversion "latest"
toolset "clang" -- No MSVC
defines { "_CRT_SECURE_NO_WARNINGS" }
filter "system:Linux"
toolset "gcc"
cdialect "gnu11"
links { "m" }
filter "configurations:*_x86_32"
architecture "x86"
filter "configurations:*_x86_64"
architecture "x86_64"
filter "configurations:*_ARM"
architecture "ARM"
filter "configurations:*_ARM64"
architecture "ARM64"
filter {}
local output_target = "%{cfg.buildcfg}-%{cfg.system}-%{cfg.architecture}"
local vendorsrc = "vendor/%{prj.name}/"
project "cwalk"
language "C"
kind "StaticLib"
targetdir( "sbin/" .. output_target .. "/%{prj.name}" )
objdir( "obj/" .. output_target .. "/%{prj.name}" )
files {
( vendorsrc .. "**.h" ),
( vendorsrc .. "**.c" )
}
project "cJSON"
language "C"
kind "StaticLib"
targetdir( "sbin/" .. output_target .. "/%{prj.name}" )
objdir( "obj/" .. output_target .. "/%{prj.name}" )
files {
( vendorsrc .. "**.h" ),
( vendorsrc .. "**.c" )
}
project "lua"
language "C"
kind "StaticLib"
targetdir( "sbin/" .. output_target .. "/%{prj.name}" )
objdir( "obj/" .. output_target .. "/%{prj.name}" )
files {
(vendorsrc .. "src/**.h"),
(vendorsrc .. "src/**.c")
}
project "ck"
language "C"
kind "ConsoleApp"
targetdir( "bin/" )
objdir( "obj/" .. output_target .. "/%{prj.name}" )
files {
"src/**.c",
"include/**.h"
}
includedirs { "include/", "vendor/cwalk/", "vendor/cJSON/", "vendor/lua/src/" }
links { "cJSON", "cwalk", "lua" }
-- Copying Lua helper code to bin directory
postbuildcommands { "{COPYDIR} lapi bin/" }