Skip to content

Commit bc51e76

Browse files
committed
update premake and base template
1 parent af016a2 commit bc51e76

File tree

2 files changed

+145
-140
lines changed

2 files changed

+145
-140
lines changed

premake5.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ workspace("qor")
2727
-- Release Config
2828
configuration "Release"
2929
defines { "NDEBUG" }
30-
optimize "speed"
30+
optimize "Speed"
31+
floatingpoint "Fast"
3132
targetname("qor_dist")
3233

3334
-- gmake Config

templates/base/premake5.lua

Lines changed: 143 additions & 139 deletions
Original file line numberDiff line numberDiff line change
@@ -3,172 +3,81 @@ workspace("base")
33
debugdir("bin")
44

55
configurations {"Debug", "Release"}
6-
defines { "GLM_FORCE_RADIANS", "NOMINMAX" }
76

7+
defines {
8+
"GLM_FORCE_CTOR_INIT",
9+
"GLM_ENABLE_EXPERIMENTAL",
10+
"GLM_FORCE_RADIANS",
11+
--"QOR_NO_CAIRO",
12+
--"QOR_NO_PYTHON",
13+
--"QOR_NO_PHYSICS",
14+
--"QOR_NO_NET",
15+
"NOMINMAX"
16+
}
17+
818
-- Debug Config
919
configuration "Debug"
1020
defines { "DEBUG", "BACKWARD_HAS_BFD=1" }
1121
symbols "On"
22+
23+
symbols "On"
24+
links {
25+
"z",
26+
"bfd",
27+
"iberty"
28+
}
1229
linkoptions { }
1330

14-
configuration "gmake"
15-
links {
16-
"z",
17-
"bfd",
18-
"iberty"
19-
}
20-
2131
-- Release Config
2232
configuration "Release"
2333
defines { "NDEBUG" }
24-
flags { "OptimizeSpeed" }
34+
optimize "Speed"
35+
floatingpoint "Fast"
2536
targetname("base_dist")
2637

2738
-- gmake Config
2839
configuration "gmake"
2940
buildoptions { "-std=c++11" }
3041
-- Uncomment the following line to get in depth debugging
3142
-- buildoptions { "-std=c++11", "-pedantic", "-Wall", "-Wextra", '-v', '-fsyntax-only'}
32-
links {
33-
"pthread",
34-
"SDL2_ttf",
35-
"SDL2",
36-
"GLEW",
37-
"assimp",
38-
"freeimage",
39-
"openal",
40-
"alut",
41-
"ogg",
42-
"vorbis",
43-
"vorbisfile",
44-
"boost_system",
45-
"boost_filesystem",
46-
"boost_coroutine",
47-
"boost_python",
48-
"boost_regex",
49-
"jsoncpp",
50-
"z",
51-
"RakNetDLL",
52-
--"BulletSoftBody",
53-
"BulletDynamics",
54-
"BulletCollision",
55-
"LinearMath",
56-
}
57-
includedirs {
58-
"lib/Qor/",
59-
"lib/Qor/lib/kit",
60-
"/usr/local/include/",
61-
"/usr/include/bullet/",
62-
"/usr/include/raknet/DependentExtensions"
63-
}
64-
65-
libdirs {
66-
"/usr/local/lib",
67-
"/usr/local/lib64/",
68-
}
69-
70-
buildoptions {
71-
"`python2-config --includes`",
72-
"`pkg-config --cflags cairomm-1.0 pangomm-1.4`"
73-
}
74-
75-
linkoptions {
76-
"`python2-config --libs`",
77-
"`pkg-config --libs cairomm-1.0 pangomm-1.4`"
78-
}
79-
80-
configuration "linux"
81-
links {
82-
"GL",
83-
"boost_thread",
84-
}
8543

8644
-- OS X Config
8745
configuration "macosx"
88-
links {
89-
"boost_thread-mt",
90-
}
91-
buildoptions { "-framework OpenGL" }
92-
linkoptions { "-framework OpenGL" }
93-
9446
buildoptions { "-U__STRICT_ANSI__", "-stdlib=libc++" }
9547
linkoptions { "-stdlib=libc++" }
9648

97-
configuration "windows"
98-
toolset "v141"
99-
flags { "MultiProcessorCompile" }
100-
101-
links {
102-
"ws2_32",
103-
"glibmm.dll.lib",
104-
"cairomm.dll.lib",
105-
"pangomm.dll.lib",
106-
"SDL2main",
107-
"OpenGL32",
108-
"GLU32",
109-
"SDL2",
110-
"SDL2_ttf",
111-
"GLEW32",
112-
"assimp",
113-
"freeimage",
114-
"OpenAL32",
115-
"alut",
116-
"libogg",
117-
"libvorbis",
118-
"libvorbisfile",
119-
--"boost_system-vc141-mt-1_64",
120-
--"boost_filesystem-vc141-mt-1_64",
121-
--"boost_thread-vc141-mt-1_64",
122-
"python27",
123-
--"boost_python-vc141-mt-1_64",
124-
--"boost_coroutine-vc141-mt-1_64",
125-
--"boost_regex-vc141-mt-1_64",
126-
"lib_json",
127-
}
12849

129-
includedirs {
130-
"c:/Python27/include",
131-
"c:/gtkmm/lib/pangomm/include",
132-
"c:/gtkmm/lib/sigc++/include",
133-
"c:/gtkmm/lib/cairomm/include",
134-
"c:/gtkmm/include/pango",
135-
"c:/gtkmm/include/pangomm",
136-
"c:/gtkmm/include/sigc++",
137-
"c:/gtkmm/include",
138-
"c:/gtkmm/include/cairo",
139-
"c:/gtkmm/lib/glib/include",
140-
"c:/gtkmm/include/glib",
141-
"c:/gtkmm/lib/glibmm/include",
142-
"c:/gtkmm/include/glibmm",
143-
"c:/gtkmm/include/cairomm",
144-
"c:/gtkmm/include",
145-
"c:/local/boost_1_64_0",
146-
"c:/Program Files (x86)/OpenAL 1.1 SDK/include",
147-
"c:/msvc/include",
148-
}
149-
configuration { "windows", "Debug" }
150-
libdirs { "c:/msvc/lib32/debug" }
151-
links {
152-
"RakNet_VS2008_LibStatic_Debug_Win32",
153-
}
154-
configuration {}
155-
configuration { "windows", "Release" }
156-
links {
157-
"RakNet_VS2008_LibStatic_Release_Win32",
158-
}
159-
configuration { "windows" }
160-
161-
libdirs {
162-
"c:/Program Files (x86)/OpenAL 1.1 SDK/libs/Win32",
163-
"c:/msvc/lib32",
164-
"c:/gtkmm/lib",
165-
"c:/local/boost_1_64_0/lib32-msvc-14.1",
166-
"C:/Python27/libs",
167-
}
168-
16950
project "base"
17051
kind "WindowedApp"
17152
language "C++"
53+
links {
54+
"pthread",
55+
"GL",
56+
"GLU",
57+
"SDL2",
58+
"SDL2_ttf",
59+
"GLEW",
60+
"assimp",
61+
"freeimage",
62+
"openal",
63+
"alut",
64+
"ogg",
65+
"vorbis",
66+
"vorbisfile",
67+
"boost_system",
68+
"boost_thread",
69+
"boost_filesystem",
70+
"boost_python",
71+
"boost_coroutine",
72+
"boost_regex",
73+
"jsoncpp",
74+
"BulletSoftBody",
75+
"BulletDynamics",
76+
"BulletCollision",
77+
"LinearMath",
78+
"z",
79+
"raknet",
80+
}
17281

17382
-- Project Files
17483
files {
@@ -191,12 +100,107 @@ workspace("base")
191100
"lib/Qor/lib/kit/tests/**",
192101
"lib/Qor/lib/kit/toys/**"
193102
}
103+
104+
includedirs {
105+
"lib/Qor/",
106+
"lib/Qor/lib/kit",
107+
"/usr/local/include/",
108+
"/usr/include/bullet/",
109+
"/usr/include/rapidxml/",
110+
"/usr/include/raknet/DependentExtensions"
111+
}
112+
113+
libdirs {
114+
"/usr/local/lib",
115+
"/usr/local/lib64/",
116+
}
194117

118+
buildoptions {
119+
"`python2-config --includes`",
120+
"`pkg-config --cflags cairomm-1.0 pangomm-1.4`"
121+
}
122+
123+
linkoptions {
124+
"`python2-config --libs`",
125+
"`pkg-config --libs cairomm-1.0 pangomm-1.4`"
126+
}
127+
128+
project "test"
129+
kind "ConsoleApp"
130+
language "C++"
131+
links {
132+
"pthread",
133+
"GL",
134+
"GLU",
135+
"SDL2",
136+
"GLEW",
137+
"assimp",
138+
"freeimage",
139+
"openal",
140+
"alut",
141+
"ogg",
142+
"vorbis",
143+
"vorbisfile",
144+
"boost_system",
145+
"boost_thread",
146+
"boost_filesystem",
147+
"boost_python",
148+
"boost_coroutine",
149+
"boost_regex",
150+
"jsoncpp",
151+
"BulletSoftBody",
152+
"BulletDynamics",
153+
"BulletCollision",
154+
"LinearMath",
155+
"z",
156+
"RakNetDLL",
157+
}
158+
159+
-- Project Files
160+
files {
161+
"src/**.h",
162+
"src/**.cpp",
163+
"lib/Qor/Qor/**.h",
164+
"lib/Qor/Qor/**.cpp",
165+
"lib/Qor/lib/kit/**.h",
166+
"lib/Qor/lib/kit/**.cpp"
167+
}
168+
169+
-- Exluding Files
170+
excludes {
171+
"src/Main.cpp", -- run test suite instead
172+
173+
"lib/Qor/Qor/Main.cpp",
174+
"lib/Qor/Qor/Info.cpp",
175+
"lib/Qor/Qor/DemoState.*",
176+
--"lib/Qor/Qor/tests/**", -- don't exclude test suite
177+
"lib/Qor/Qor/scripts/**",
178+
"lib/Qor/Qor/addons/**",
179+
"lib/Qor/lib/kit/tests/**",
180+
"lib/Qor/lib/kit/toys/**"
181+
}
182+
195183
includedirs {
196184
"lib/Qor/",
197185
"lib/Qor/lib/kit",
198186
"/usr/local/include/",
199187
"/usr/include/bullet/",
188+
"/usr/include/rapidxml/",
200189
"/usr/include/raknet/DependentExtensions"
201190
}
202191

192+
libdirs {
193+
"/usr/local/lib",
194+
"/usr/local/lib64/",
195+
}
196+
197+
buildoptions {
198+
"`python2-config --includes`",
199+
"`pkg-config --cflags cairomm-1.0 pangomm-1.4`"
200+
}
201+
202+
linkoptions {
203+
"`python2-config --libs`",
204+
"`pkg-config --libs cairomm-1.0 pangomm-1.4`"
205+
}
206+

0 commit comments

Comments
 (0)