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