summaryrefslogtreecommitdiff
path: root/scripts/premake4.lua
diff options
context:
space:
mode:
authorarseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640>2010-07-11 13:07:53 +0000
committerarseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640>2010-07-11 13:07:53 +0000
commite31431b58c6c8d23e849f822b1cd9229fa8b2005 (patch)
tree72333dea5471894cd703e28a308437f0a4a1855e /scripts/premake4.lua
parentd130e82aaa62564c603ce527baf79508def11deb (diff)
scripts: Removed VS2002/2003 projects (default runtime library is single-threaded there, so I'll need three versions of the projects, one of which can't be generated with premake), added separate static CRT projects instead of multiple configurations
git-svn-id: http://pugixml.googlecode.com/svn/trunk@589 99668b35-9821-0410-8761-19e4c4f06640
Diffstat (limited to 'scripts/premake4.lua')
-rw-r--r--scripts/premake4.lua24
1 files changed, 15 insertions, 9 deletions
diff --git a/scripts/premake4.lua b/scripts/premake4.lua
index d525031..977fb92 100644
--- a/scripts/premake4.lua
+++ b/scripts/premake4.lua
@@ -1,6 +1,7 @@
-- Reset RNG seed to get consistent results across runs (i.e. XCode)
math.randomseed(12345)
+local static = _ARGS[1] == 'static'
local action = premake.action.current()
if string.startswith(_ACTION, "vs") then
@@ -17,7 +18,7 @@ if string.startswith(_ACTION, "vs") then
-- Rename output file
function action.onproject(prj)
- premake.generate(prj, "%%_" .. _ACTION .. ".vcproj", premake.vs200x_vcproj)
+ premake.generate(prj, "%%_" .. _ACTION .. (static and "_static" or "") .. ".vcproj", premake.vs200x_vcproj)
end
end
elseif _ACTION == "codeblocks" then
@@ -46,11 +47,14 @@ if string.startswith(_ACTION, "vs") then
configuration "x64" targetdir(_ACTION .. "/x64")
end
- configurations { "Debug", "Release", "DebugStatic", "ReleaseStatic" }
+ configurations { "Debug", "Release" }
- configuration "DebugStatic" targetsuffix "_sd"
- configuration "ReleaseStatic" targetsuffix "_s"
- configuration "Debug" targetsuffix "_d"
+ if static then
+ configuration "Debug" targetsuffix "_sd"
+ configuration "Release" targetsuffix "_s"
+ else
+ configuration "Debug" targetsuffix "_d"
+ end
else
if _ACTION == "xcode3" then
platforms "universal"
@@ -68,13 +72,15 @@ project "pugixml"
flags { "NoPCH", "NoMinimalRebuild" }
uuid "89A1E353-E2DC-495C-B403-742BE206ACED"
-configuration "Debug*"
+configuration "Debug"
defines { "_DEBUG" }
flags { "Symbols" }
-configuration "Release*"
+configuration "Release"
defines { "NDEBUG" }
flags { "Optimize" }
-configuration "*Static"
- flags { "StaticRuntime" }
+if static then
+ configuration "*"
+ flags { "StaticRuntime" }
+end