forked from erincatto/box2d
-
Notifications
You must be signed in to change notification settings - Fork 1
/
premake5.lua
148 lines (137 loc) · 3.26 KB
/
premake5.lua
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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
-- Box2D premake5 script.
-- https://premake.github.io/
workspace 'Box2D'
configurations { 'Debug', 'Release' }
startproject 'Testbed'
location 'Build'
symbols 'On'
warnings 'Extra'
cppdialect 'C++11'
filter 'system:linux'
platforms { 'x86_64' }
filter 'system:macosx'
platforms { 'x86_64' }
filter 'system:windows'
platforms { 'x86', 'x86_64' }
defaultplatform 'x86_64'
defines { '_CRT_SECURE_NO_WARNINGS' }
filter {}
filter 'configurations:Debug'
defines { 'DEBUG' }
optimize 'Off'
filter 'configurations:Release'
defines { 'NDEBUG' }
optimize 'On'
filter {}
project 'Box2D'
kind 'StaticLib'
files { 'Box2D/**' }
includedirs { '.' }
project 'HelloWorld'
kind 'ConsoleApp'
files { 'HelloWorld/HelloWorld.cpp' }
includedirs { '.' }
links { 'Box2D' }
project 'Testbed'
kind 'ConsoleApp'
debugdir 'Testbed'
warnings 'Default'
includedirs { '.' }
files
{
'Testbed/Data/*',
'Testbed/Framework/*',
'Testbed/Tests/*',
'Testbed/glfw/internal.h',
'Testbed/glfw/glfw_config.h',
'Testbed/glfw/glfw3.h',
'Testbed/glfw/glfw3native.h',
'Testbed/glfw/context.c',
'Testbed/glfw/init.c',
'Testbed/glfw/input.c',
'Testbed/glfw/monitor.c',
'Testbed/glfw/vulkan.c',
'Testbed/glfw/window.c',
'Testbed/imgui/*'
}
filter { 'system:windows' }
files
{
'Testbed/glad/*',
'Testbed/glfw/win32_platform.h',
'Testbed/glfw/win32_joystick.h',
'Testbed/glfw/wgl_context.h',
'Testbed/glfw/egl_context.h',
'Testbed/glfw/win32_init.c',
'Testbed/glfw/win32_joystick.c',
'Testbed/glfw/win32_monitor.c',
'Testbed/glfw/win32_time.c',
'Testbed/glfw/win32_tls.c',
'Testbed/glfw/win32_window.c',
'Testbed/glfw/wgl_context.c',
'Testbed/glfw/egl_context.c'
}
links { 'Box2D', 'opengl32', 'winmm' }
filter { 'system:macosx' }
files
{
'Testbed/glfw/cocoa_platform.h',
'Testbed/glfw/iokit_joystick.h',
'Testbed/glfw/posix_tls.h',
'Testbed/glfw/nsgl_context.h',
'Testbed/glfw/egl_context.h',
'Testbed/glfw/cocoa_init.m',
'Testbed/glfw/cocoa_joystick.m',
'Testbed/glfw/cocoa_monitor.m',
'Testbed/glfw/cocoa_window.m',
'Testbed/glfw/cocoa_time.c',
'Testbed/glfw/posix_tls.c',
'Testbed/glfw/nsgl_context.m',
'Testbed/glfw/egl_context.c'
}
--defines { 'GLFW_INCLUDE_GLCOREARB' }
links
{
'Box2D',
'OpenGL.framework',
'Cocoa.framework',
'IOKit.framework',
'CoreFoundation.framework',
'CoreVideo.framework'
}
filter { 'system:linux' }
files
{
'Testbed/glad/*',
'Testbed/glfw/x11_platform.h',
'Testbed/glfw/xkb_unicode.h',
'Testbed/glfw/linux_joystick.h',
'Testbed/glfw/posix_time.h',
'Testbed/glfw/posix_tls.h',
'Testbed/glfw/glx_context.h',
'Testbed/glfw/egl_context.h',
'Testbed/glfw/x11_init.c',
'Testbed/glfw/x11_monitor.c',
'Testbed/glfw/x11_window.c',
'Testbed/glfw/glx_context.h',
'Testbed/glfw/glx_context.c',
'Testbed/glfw/glext.h',
'Testbed/glfw/xkb_unicode.c',
'Testbed/glfw/linux_joystick.c',
'Testbed/glfw/posix_time.c',
'Testbed/glfw/posix_tls.c',
'Testbed/glfw/glx_context.c',
'Testbed/glfw/egl_context.c'
}
links
{
'Box2D',
'GL',
'X11',
'Xrandr',
'Xinerama',
'Xcursor',
'pthread',
'dl'
}
filter {}