-
Notifications
You must be signed in to change notification settings - Fork 41
/
premake4.lua
109 lines (84 loc) · 3.63 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
-- premake.lua - public domain
-- authored from 2012-2013 by Adrien Herubel
solution "imgui"
configurations { "Debug", "Release" }
platforms {"native", "x64", "x32"}
-- imgui sample_gl3
project "sample_gl3"
kind "ConsoleApp"
language "C++"
files { "sample_gl3.cpp", "imgui.cpp", "imguiRenderGL3.cpp", "imgui.h", "imguiRenderGL3.h", "stb_truetype.h" }
includedirs { "lib/glfw/include", "src", "common", "lib/" }
links {"glfw", "glew"}
defines { "GLEW_STATIC" }
configuration { "linux" }
links {"X11","Xrandr", "rt", "GL", "GLU", "pthread"}
configuration { "windows" }
links {"glu32","opengl32", "gdi32", "winmm", "user32"}
configuration { "macosx" }
linkoptions { "-framework OpenGL", "-framework Cocoa", "-framework IOKit" }
configuration "Debug"
defines { "DEBUG" }
flags { "Symbols", "ExtraWarnings"}
configuration "Release"
defines { "NDEBUG" }
flags { "Optimize", "ExtraWarnings"}
-- imgui sample_gl2
project "sample_gl2"
kind "ConsoleApp"
language "C++"
files { "sample_gl2.cpp", "imgui.cpp", "imguiRenderGL2.cpp", "imgui.h", "imguiRenderGL2.h", "stb_truetype.h" }
includedirs { "lib/glfw/include", "src", "common", "lib/" }
links {"glfw", "glew"}
defines { "GLEW_STATIC" }
configuration { "linux" }
links {"X11","Xrandr", "rt", "GL", "GLU", "pthread"}
configuration { "windows" }
links {"glu32","opengl32", "gdi32", "winmm", "user32"}
configuration { "macosx" }
linkoptions { "-framework OpenGL", "-framework Cocoa", "-framework IOKit" }
configuration "Debug"
defines { "DEBUG" }
flags { "Symbols", "ExtraWarnings"}
configuration "Release"
defines { "NDEBUG" }
flags { "Optimize", "ExtraWarnings"}
-- GLFW Library
project "glfw"
kind "StaticLib"
language "C"
files { "lib/glfw/lib/*.h", "lib/glfw/lib/*.c", "lib/glfw/include/GL/glfw.h" }
includedirs { "lib/glfw/lib", "lib/glfw/include"}
configuration {"linux"}
files { "lib/glfw/lib/x11/*.c", "lib/glfw/x11/*.h" }
includedirs { "lib/glfw/lib/x11" }
defines { "_GLFW_USE_LINUX_JOYSTICKS", "_GLFW_HAS_XRANDR", "_GLFW_HAS_PTHREAD" ,"_GLFW_HAS_SCHED_YIELD", "_GLFW_HAS_GLXGETPROCADDRESS" }
buildoptions { "-pthread" }
configuration {"windows"}
files { "lib/glfw/lib/win32/*.c", "lib/glfw/win32/*.h" }
includedirs { "lib/glfw/lib/win32" }
defines { "_GLFW_USE_LINUX_JOYSTICKS", "_GLFW_HAS_XRANDR", "_GLFW_HAS_PTHREAD" ,"_GLFW_HAS_SCHED_YIELD", "_GLFW_HAS_GLXGETPROCADDRESS" }
configuration {"Macosx"}
files { "lib/glfw/lib/cocoa/*.c", "lib/glfw/lib/cocoa/*.h", "lib/glfw/lib/cocoa/*.m" }
includedirs { "lib/glfw/lib/cocoa" }
defines { }
buildoptions { " -fno-common" }
linkoptions { "-framework OpenGL", "-framework Cocoa", "-framework IOKit" }
configuration "Debug"
defines { "DEBUG" }
flags { "Symbols", "ExtraWarnings" }
configuration "Release"
defines { "NDEBUG" }
flags { "Optimize", "ExtraWarnings" }
-- GLEW Library
project "glew"
kind "StaticLib"
language "C"
files {"lib/glew/*.c", "lib/glew/*.h"}
defines { "GLEW_STATIC" }
configuration "Debug"
defines { "DEBUG" }
flags { "Symbols", "ExtraWarnings" }
configuration "Release"
defines { "NDEBUG" }
flags { "Optimize", "ExtraWarnings" }