From e31431b58c6c8d23e849f822b1cd9229fa8b2005 Mon Sep 17 00:00:00 2001 From: "arseny.kapoulkine" Date: Sun, 11 Jul 2010 13:07:53 +0000 Subject: 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 --- scripts/premake4.lua | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) (limited to 'scripts/premake4.lua') 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 -- cgit v1.2.3