source: trunk/nv.lua @ 426

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