forked from syoyo/MMDLoader
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpremake4.lua
106 lines (87 loc) · 2.91 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
newoption {
trigger = "with-glm",
description = "Build with GLM replacement for glu"
}
newoption {
trigger = "with-bullet",
description = "Build with Bullet physics"
}
newoption {
trigger = "with-euler-camera",
description = "Build with Euler camera"
}
sources = {
"viewer_main.cc",
"trackball.cpp"
}
mmd_sources = {
"mmd_scene.cc",
"pmd_reader.cc",
"vmd_reader.cc",
"vmd_animation.cc",
}
-- premake4.lua
solution "MMDTestSolution"
configurations { "Release", "Debug" }
if (os.is("windows")) then
platforms { "x32", "x64" }
else
platforms { "native", "x32", "x64" }
end
-- A project defines one build target
project "MMDTest"
kind "ConsoleApp"
language "C++"
files { sources, mmd_sources }
includedirs {
"./"
}
-- GLM replacement for glu
if _OPTIONS["with-glm"] then
defines { 'ENABLE_GLM' }
end
-- Euler camera
if _OPTIONS["with-euler-camera"] then
defines { 'ENABLE_GLM', 'ENABLE_EULER_CAMERA' }
end
-- MacOSX. Guess we use gcc.
configuration { "macosx", "gmake" }
defines { '_LARGEFILE_SOURCE', '_FILE_OFFSET_BITS=64' }
links { "OpenGL.framework", "GLUT.framework" } -- Use system's SDL
-- Bullet physics
if _OPTIONS["with-bullet"] then
defines { 'ENABLE_BULLET' }
includedirs { "./../../extlibs/bullet/bullet-2.79/src" }
libdirs { "./../../extlibs/bullet/bullet-2.79/src/BulletDynamics"
, "./../../extlibs/bullet/bullet-2.79/src/BulletCollision"
, "./../../extlibs/bullet/bullet-2.79/src/LinearMath" }
links { "BulletDynamics", "BulletCollision", "LinearMath" }
end
configuration { "macosx", "xcode4" }
includedirs {
"/Library/Frameworks/SDL.framework/Headers"
}
-- Windows specific
configuration { "windows" }
defines { 'NOMINMAX', '_LARGEFILE_SOURCE', '_FILE_OFFSET_BITS=64' }
-- Linux specific
configuration { "linux", "gmake" }
defines { '_LARGEFILE_SOURCE', '_FILE_OFFSET_BITS=64' }
-- Bullet physics
if _OPTIONS["with-bullet"] then
defines { 'ENABLE_BULLET' }
includedirs { "./extlibs/bullet/bullet3/src" }
libdirs { "./extlibs/bullet/bullet3/src/BulletDynamics"
, "./extlibs/bullet/bullet3/src/BulletCollision"
, "./extlibs/bullet/bullet3/src/LinearMath" }
links { "BulletDynamics", "BulletCollision", "LinearMath" }
end
links { "GL", "glut" }
configuration "Debug"
defines { "DEBUG" } -- -DDEBUG
flags { "Symbols" }
targetname "mmdview_debug"
configuration "Release"
-- defines { "NDEBUG" } -- -NDEBUG
flags { "Symbols", "Optimize" }
targetname "mmdview"