-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpremake5.lua
More file actions
87 lines (67 loc) · 2.04 KB
/
Copy pathpremake5.lua
File metadata and controls
87 lines (67 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
workspace "Line-Render-Test"
configurations { "debug", "release" }
startproject "Line-Render-Test"
outputdir = "%{cfg.buildcfg}-%{cfg.system}-%{cfg.architecture}"
newoption {
trigger = "wasm",
description = "Choose whether or not to make build files for wasm",
}
project "Line-Render-Test"
language "C"
location "src"
kind "ConsoleApp"
includedirs {
"src",
"src/third_party"
}
files {
"src/**.h",
"src/**.c",
}
objdir ("bin-int/" .. outputdir .. "/%{prj.name}")
targetdir ("bin/" .. outputdir)
targetprefix ""
warnings "Extra"
toolset "clang"
if _OPTIONS["wasm"] then
filter "action:ecc"
-- This is just to make the clang language server happy
defines "__EMSCRIPTEN__"
includedirs "../emsdk/upstream/emscripten/system/include/"
filter "options:wasm"
buildoptions {
"-fPIC",
}
linkoptions {
"-sWASM=1",
"-sASYNCIFY=1",
"-sALLOW_MEMORY_GROWTH=1",
"-sOFFSCREEN_FRAMEBUFFER=1",
"-sMIN_WEBGL_VERSION=2",
"-sMAIN_MODULE=2",
}
links { "m", "GL" }
targetextension ".js"
else
architecture "x64"
filter { "action:not vs*", "configurations:debug" }
buildoptions { "-fsanitize=address" }
linkoptions { "-fsanitize=address" }
filter "system:linux"
links {
"m", "X11", "GL", "GLX",
}
filter { "system:windows", "action:*gmake*", "configurations:debug" }
linkoptions { "-g" }
filter "system:windows"
systemversion "latest"
links {
"gdi32", "kernel32", "user32", "opengl32"
}
end
filter "configurations:debug"
symbols "On"
defines { "DEBUG" }
filter "configurations:release"
optimize "On"
defines { "NDEBUG" }