[2] | 1 | project "nv"
|
---|
| 2 | location (_ACTION)
|
---|
[120] | 3 | language "C++"
|
---|
[2] | 4 | kind "StaticLib"
|
---|
| 5 | includedirs { "." }
|
---|
[193] | 6 | files { "nv/**.hh", "nv/**.inl", "nv/**.inc", "src/**.cc" }
|
---|
[120] | 7 | targetname "nv"
|
---|
| 8 |
|
---|
| 9 | -- injection!
|
---|
| 10 | solution( solution().name )
|
---|
| 11 | configuration "*"
|
---|
| 12 | includedirs { os.getenv("GLM_PATH") }
|
---|
| 13 | configuration "gmake"
|
---|
[121] | 14 | if _ACTION == "gmake-clang" then
|
---|
| 15 | buildoptions {
|
---|
| 16 | "-std=c++11",
|
---|
[204] | 17 | -- on Mac OS X don't try to use old stdc++
|
---|
| 18 | "-stdlib=libc++",
|
---|
[121] | 19 | "-Weverything",
|
---|
| 20 | -- obviously we don't care about C++98 compatibility
|
---|
| 21 | "-Wno-c++98-compat",
|
---|
| 22 | -- obviously we don't care about C++98 compatibility
|
---|
| 23 | "-Wno-c++98-compat-pedantic",
|
---|
| 24 | -- an evil one has to embrace
|
---|
| 25 | "-Wno-float-equal",
|
---|
| 26 | -- padding is a non-issue at the moment
|
---|
| 27 | "-Wno-padded",
|
---|
| 28 | -- we don't want to list all 128 keys of the key
|
---|
| 29 | -- enum each time, right?
|
---|
| 30 | "-Wno-switch-enum",
|
---|
| 31 | -- yes, we need exit time destructors for libraries
|
---|
| 32 | "-Wno-exit-time-destructors",
|
---|
| 33 | -- same here
|
---|
| 34 | "-Wno-global-constructors",
|
---|
| 35 | -- no reasonable way to fix this with abstract
|
---|
| 36 | -- interfaces.
|
---|
| 37 | "-Wno-weak-vtables"
|
---|
| 38 | }
|
---|
[205] | 39 | buildoptions {
|
---|
| 40 | "-stdlib=libc++"
|
---|
| 41 | }
|
---|
[121] | 42 | else
|
---|
| 43 | buildoptions { "-std=c++0x" }
|
---|
| 44 | end
|
---|
| 45 |
|
---|
[123] | 46 | configuration "linux"
|
---|
| 47 | linkoptions { "-ldl" }
|
---|
| 48 |
|
---|
[120] | 49 | configuration "vs*"
|
---|
| 50 | defines { "_SECURE_SCL=0", "_CRT_SECURE_NO_WARNINGS=1" }
|
---|
| 51 |
|
---|
| 52 | if _ACTION == "gmake-clang" then
|
---|
| 53 | premake.gcc.cc = "clang"
|
---|
| 54 | premake.gcc.cxx = "clang++"
|
---|
| 55 | _ACTION = "gmake"
|
---|
| 56 | end
|
---|
| 57 |
|
---|
| 58 | premake.action.add {
|
---|
| 59 | trigger = "gmake-clang",
|
---|
| 60 | description = "gmake file with clang overrides, needs 'make -R' to work",
|
---|
| 61 | }
|
---|
| 62 |
|
---|
| 63 | if _ACTION == "clean" then
|
---|
| 64 | for action in premake.action.each() do
|
---|
| 65 | os.rmdir(action.trigger)
|
---|
| 66 | end
|
---|
[123] | 67 | end
|
---|