-
Notifications
You must be signed in to change notification settings - Fork 4
/
premake4.lua
117 lines (94 loc) · 3.74 KB
/
premake4.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
solution "aogl"
configurations { "Debug", "Release" }
platforms {"native", "x64", "x32"}
project "aogl"
kind "ConsoleApp"
language "C++"
files { "aogl.cpp"}
includedirs { "lib/glfw/include", "src", "common", "lib/" }
links {"imgui", "glfw", "glew", "stb"}
defines { "GLEW_STATIC" }
configuration { "linux" }
links {"X11","Xrandr", "Xi", "Xxf86vm", "rt", "GL", "GLU", "pthread"}
configuration { "windows" }
links {"glu32","opengl32", "gdi32", "winmm", "user32"}
configuration { "macosx" }
linkoptions { "-framework OpenGL", "-framework CoreVideo" , "-framework Cocoa", "-framework IOKit"}
configuration "Debug"
defines { "DEBUG" }
flags {"ExtraWarnings", "Symbols" }
targetsuffix "_d"
configuration "Release"
defines { "NDEBUG" }
flags { "Optimize"}
-- GLFW Library
project "glfw"
kind "StaticLib"
language "C"
files { "lib/glfw/include/GL/glfw.h" }
includedirs { "lib/glfw/lib", "lib/glfw/include"}
configuration {"linux"}
files { "lib/glfw/lib/*.c", "lib/glfw/*.h" }
excludes { "lib/glfw/lib/egl_*", "lib/glfw/lib/cocoa_*", "lib/glfw/lib/win32_*", "lib/glfw/lib/wgl_*" }
defines { "_GLFW_GLX", "_GLFW_X11", "_GLFW_USE_OPENGL", "_GLFW_USE_LINUX_JOYSTICKS", "_GLFW_HAS_XRANDR", "_GLFW_HAS_PTHREAD" ,"_GLFW_HAS_SCHED_YIELD", "_GLFW_HAS_GLXGETPROCADDRESS" }
buildoptions { "-std=c++11", "-Wall", "-pthread" }
configuration {"windows"}
files { "lib/glfw/lib/*.c", "lib/glfw/*.h" }
excludes { "lib/glfw/lib/egl_*", "lib/glfw/lib/cocoa_*", "lib/glfw/lib/x11_*", "lib/glfw/lib/glx_*" }
includedirs { "lib/glfw/lib/win32" }
defines { "_GLFW_WGL", "_GLFW_WIN32", "_GLFW_USE_OPENGL", "_GLFW_HAS_PTHREAD" ,"_GLFW_HAS_SCHED_YIELD" }
configuration {"Macosx"}
files { "lib/glfw/lib/*.c", "lib/glfw/lib/*.m", "lib/glfw/*.h" }
excludes { "lib/glfw/lib/egl_*", "lib/glfw/lib/glx_*", "lib/glfw/lib/x11_*", "lib/glfw/lib/win32_*", "lib/glfw/lib/wgl_*" }
defines { "_GLFW_COCOA", "_GLFW_NSGL", "_GLFW_USE_OPENGL", "_GLFW_HAS_PTHREAD" ,"_GLFW_HAS_SCHED_YIELD"}
buildoptions { "-Wall", "-pthread" }
configuration "Debug"
defines { "DEBUG" }
flags { "Symbols" }
targetdir "bin/debug"
configuration "Release"
defines { "NDEBUG" }
flags { "Optimize" }
targetdir "bin/release"
-- GLEW Library
project "glew"
kind "StaticLib"
language "C"
files {"lib/glew/*.c", "lib/glew/*.h"}
defines { "GLEW_STATIC" }
configuration "Debug"
defines { "DEBUG" }
flags { "Symbols" }
targetdir "bin/debug"
targetdir "bin/debug"
configuration "Release"
defines { "NDEBUG" }
flags { "Optimize" }
targetdir "bin/release"
-- imgui Library
project "imgui"
kind "StaticLib"
language "C++"
files {"lib/imgui/*.cpp", "lib/imgui/*.h"}
includedirs { "lib/", "lib/glfw/include" }
configuration "Debug"
defines { "DEBUG" }
flags { "Symbols" }
targetdir "bin/debug"
configuration "Release"
defines { "NDEBUG" }
flags { "Optimize" }
targetdir "bin/release"
-- stb Library
project "stb"
kind "StaticLib"
language "C"
files {"lib/stb/*.c", "lib/stb/*.h"}
configuration "Debug"
defines { "DEBUG" }
flags { "Symbols" }
targetdir "bin/debug"
configuration "Release"
defines { "NDEBUG" }
flags { "Optimize" }
targetdir "bin/release"