1 | NV_RUNTIME = NV_RUNTIME or "scrt"
|
---|
2 |
|
---|
3 | project "nv-core"
|
---|
4 | location (_ACTION.."/"..NV_RUNTIME)
|
---|
5 | language "C++"
|
---|
6 | kind "StaticLib"
|
---|
7 | includedirs { "." }
|
---|
8 | files { "nv/common.hh", "nv/base/**.hh", "nv/ecs/**.hh", "nv/core/**.hh", "nv/stl/**.hh", "nv/interface/**.hh", "nv/detail/**.inc", "src/core/**.cc", "src/stl/**.cc" }
|
---|
9 |
|
---|
10 | project "nv-lib"
|
---|
11 | location (_ACTION.."/"..NV_RUNTIME)
|
---|
12 | language "C++"
|
---|
13 | kind "StaticLib"
|
---|
14 | includedirs { "." }
|
---|
15 | files { "nv/lib/**.hh", "nv/lib/**.inl", "nv/lib/**.inc", "src/lib/**.cc" }
|
---|
16 | links { "nv-core" }
|
---|
17 |
|
---|
18 | project "nv-curses"
|
---|
19 | location (_ACTION.."/"..NV_RUNTIME)
|
---|
20 | language "C++"
|
---|
21 | kind "StaticLib"
|
---|
22 | includedirs { "." }
|
---|
23 | files { "nv/curses/**.hh", "src/curses/**.cc" }
|
---|
24 | links { "nv-core", "nv-lib" }
|
---|
25 |
|
---|
26 | project "nv-fmod"
|
---|
27 | location (_ACTION.."/"..NV_RUNTIME)
|
---|
28 | language "C++"
|
---|
29 | kind "StaticLib"
|
---|
30 | includedirs { "." }
|
---|
31 | files { "nv/fmod/**.hh", "src/fmod/**.cc" }
|
---|
32 | links { "nv-core", "nv-lib" }
|
---|
33 |
|
---|
34 | project "nv-sdl"
|
---|
35 | location (_ACTION.."/"..NV_RUNTIME)
|
---|
36 | language "C++"
|
---|
37 | kind "StaticLib"
|
---|
38 | includedirs { "." }
|
---|
39 | files { "nv/sdl/**.hh", "src/sdl/**.cc" }
|
---|
40 | links { "nv-core", "nv-lib" }
|
---|
41 |
|
---|
42 | project "nv-gl"
|
---|
43 | location (_ACTION.."/"..NV_RUNTIME)
|
---|
44 | language "C++"
|
---|
45 | kind "StaticLib"
|
---|
46 | includedirs { "." }
|
---|
47 | files { "nv/gl/**.hh", "src/gl/**.cc" }
|
---|
48 | links { "nv-core", "nv-lib" }
|
---|
49 |
|
---|
50 | project "nv-lua"
|
---|
51 | location (_ACTION.."/"..NV_RUNTIME)
|
---|
52 | language "C++"
|
---|
53 | kind "StaticLib"
|
---|
54 | includedirs { "." }
|
---|
55 | files { "nv/lua/**.hh", "src/lua/**.cc" }
|
---|
56 | links { "nv-core", "nv-lib" }
|
---|
57 |
|
---|
58 | project "nv-rogue"
|
---|
59 | location (_ACTION.."/"..NV_RUNTIME)
|
---|
60 | language "C++"
|
---|
61 | kind "StaticLib"
|
---|
62 | includedirs { "." }
|
---|
63 | files { "nv/rogue/**.hh", "src/rogue/**.cc" }
|
---|
64 | links { "nv-core" }
|
---|
65 |
|
---|
66 | project "nv-io"
|
---|
67 | location (_ACTION.."/"..NV_RUNTIME)
|
---|
68 | language "C++"
|
---|
69 | kind "StaticLib"
|
---|
70 | includedirs { "." }
|
---|
71 | files { "nv/io/**.hh", "src/io/**.cc" }
|
---|
72 | links { "nv-core" }
|
---|
73 |
|
---|
74 | project "nv-gfx"
|
---|
75 | location (_ACTION.."/"..NV_RUNTIME)
|
---|
76 | language "C++"
|
---|
77 | kind "StaticLib"
|
---|
78 | includedirs { "." }
|
---|
79 | files { "nv/gfx/**.hh", "src/gfx/**.cc" }
|
---|
80 | links { "nv-core" }
|
---|
81 |
|
---|
82 | project "nv-engine"
|
---|
83 | location (_ACTION.."/"..NV_RUNTIME)
|
---|
84 | language "C++"
|
---|
85 | kind "StaticLib"
|
---|
86 | includedirs { "." }
|
---|
87 | files { "nv/engine/**.hh", "src/engine/**.cc" }
|
---|
88 | links { "nv-core", "nv-lib", "nv-lua" }
|
---|
89 |
|
---|
90 | project "nv-image"
|
---|
91 | location (_ACTION.."/"..NV_RUNTIME)
|
---|
92 | language "C++"
|
---|
93 | kind "StaticLib"
|
---|
94 | includedirs { "." }
|
---|
95 | files { "nv/image/**.hh", "src/image/**.cc" }
|
---|
96 | links { "nv-core" }
|
---|
97 |
|
---|
98 | project "nv-formats"
|
---|
99 | location (_ACTION.."/"..NV_RUNTIME)
|
---|
100 | language "C++"
|
---|
101 | kind "StaticLib"
|
---|
102 | includedirs { "." }
|
---|
103 | files { "nv/formats/**.hh", "src/formats/**.cc" }
|
---|
104 | links { "nv-core", "nv-lib", "nv-io", "nv-gfx" }
|
---|
105 |
|
---|
106 | project "nv-gui"
|
---|
107 | location (_ACTION.."/"..NV_RUNTIME)
|
---|
108 | language "C++"
|
---|
109 | kind "StaticLib"
|
---|
110 | includedirs { "." }
|
---|
111 | files { "nv/gui/**.hh", "src/gui/**.cc" }
|
---|
112 | links { "nv-core", "nv-lib", "nv-io", "nv-gfx", "nv-lua" }
|
---|
113 |
|
---|
114 | --[[
|
---|
115 | -- injection!
|
---|
116 | solution( solution().name )
|
---|
117 | configuration "gmake"
|
---|
118 | if CLANG then
|
---|
119 | buildoptions {
|
---|
120 | "-std=c++14",
|
---|
121 | -- -- on Mac OS X don't try to use old stdc++
|
---|
122 | -- "-stdlib=libc++",
|
---|
123 | -- "-Weverything",
|
---|
124 | -- math is so much easier with these
|
---|
125 | "-w",
|
---|
126 | "-Wno-gnu-anonymous-struct",
|
---|
127 | "-Wno-nested-anon-types",
|
---|
128 | -- obviously we don't care about C++98 compatibility
|
---|
129 | "-Wno-c++98-compat",
|
---|
130 | -- obviously we don't care about C++98 compatibility
|
---|
131 | "-Wno-c++98-compat-pedantic",
|
---|
132 | -- an evil one has to embrace
|
---|
133 | "-Wno-float-equal",
|
---|
134 | -- padding is a non-issue at the moment
|
---|
135 | "-Wno-padded",
|
---|
136 | -- we don't want to list all 128 keys of the key
|
---|
137 | -- enum each time, right?
|
---|
138 | "-Wno-switch-enum",
|
---|
139 | -- yes, we need exit time destructors for libraries
|
---|
140 | "-Wno-exit-time-destructors",
|
---|
141 | -- same here
|
---|
142 | "-Wno-global-constructors",
|
---|
143 | -- no reasonable way to fix this with abstract
|
---|
144 | -- interfaces.
|
---|
145 | "-Wno-weak-vtables",
|
---|
146 | -- this can be reenabled if I find a nice solution
|
---|
147 | "-Wno-cast-align",
|
---|
148 | }
|
---|
149 | --buildoptions {
|
---|
150 | -- "-stdlib=libc++"
|
---|
151 | --}
|
---|
152 | else
|
---|
153 | buildoptions { "-std=c++0x" }
|
---|
154 | end
|
---|
155 |
|
---|
156 | configuration { "windows", "gmake" }
|
---|
157 | linkoptions { "-Wl,--subsystem,windows" }
|
---|
158 | -- linkoptions { "-mwindows" }
|
---|
159 |
|
---|
160 | configuration "linux"
|
---|
161 | linkoptions { "-ldl" }
|
---|
162 |
|
---|
163 | configuration "vs*"
|
---|
164 | defines { "_SECURE_SCL=0", "_CRT_SECURE_NO_WARNINGS=1" } --, "_ITERATOR_DEBUG_LEVEL=0", "_HAS_ITERATOR_DEBUGGING=0" }
|
---|
165 |
|
---|
166 | if _ACTION == "gmake-clang" then
|
---|
167 | toolset "clang"
|
---|
168 | _ACTION = "gmake"
|
---|
169 | end
|
---|
170 |
|
---|
171 | premake.action.add {
|
---|
172 | trigger = "gmake-clang",
|
---|
173 | description = "gmake file with clang overrides, needs 'make -R' to work",
|
---|
174 | }
|
---|
175 |
|
---|
176 | if _ACTION == "clean" then
|
---|
177 | for action in premake.action.each() do
|
---|
178 | os.rmdir(action.trigger)
|
---|
179 | end
|
---|
180 | end
|
---|
181 |
|
---|
182 | --]]
|
---|