diff options
author | arseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640> | 2010-11-17 19:25:20 +0000 |
---|---|---|
committer | arseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640> | 2010-11-17 19:25:20 +0000 |
commit | 5720761685a1abc8ae0b5840a62359d35838ac3b (patch) | |
tree | 48012c6c40e2e7c611eb689b8d04bee306068a9b /scripts/premake4.lua | |
parent | 8f1a304dbfa472e03d06a8cdb3d9cd6f8ce06cc5 (diff) |
scripts: Ported premake script to premake4.3, regenerated all projects
git-svn-id: http://pugixml.googlecode.com/svn/trunk@799 99668b35-9821-0410-8761-19e4c4f06640
Diffstat (limited to 'scripts/premake4.lua')
-rw-r--r-- | scripts/premake4.lua | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/scripts/premake4.lua b/scripts/premake4.lua index 3584637..f1b89a0 100644 --- a/scripts/premake4.lua +++ b/scripts/premake4.lua @@ -5,11 +5,6 @@ local static = _ARGS[1] == 'static' local action = premake.action.current() if string.startswith(_ACTION, "vs") then - -- We need debugging symbols for all configurations, but runtime library depends on official Symbols flag, so hack it - function premake.vs200x_vcproj_symbols(cfg) - return 3 - end - if action then -- Disable solution generation function action.onsolution(sln) @@ -18,7 +13,19 @@ if string.startswith(_ACTION, "vs") then -- Rename output file function action.onproject(prj) - premake.generate(prj, "%%_" .. _ACTION .. (static and "_static" or "") .. ".vcproj", premake.vs200x_vcproj) + local name = "%%_" .. _ACTION .. (static and "_static" or "") + + if static then + for k, v in pairs(prj.project.__configs) do + v.objectsdir = v.objectsdir .. "Static" + end + end + + if _ACTION == "vs2010" then + premake.generate(prj, name .. ".vcxproj", premake.vs2010_vcxproj) + else + premake.generate(prj, name .. ".vcproj", premake.vs200x_vcproj) + end end end elseif _ACTION == "codeblocks" then @@ -50,10 +57,10 @@ if string.startswith(_ACTION, "vs") then configurations { "Debug", "Release" } if static then - configuration "Debug" targetsuffix "_sd" - configuration "Release" targetsuffix "_s" + configuration "Debug" targetsuffix "sd" + configuration "Release" targetsuffix "s" else - configuration "Debug" targetsuffix "_d" + configuration "Debug" targetsuffix "d" end else if _ACTION == "xcode3" then @@ -62,19 +69,18 @@ else configurations { "Debug", "Release" } - configuration "Debug" targetsuffix "_d" + configuration "Debug" targetsuffix "d" end project "pugixml" kind "StaticLib" language "C++" files { "../src/pugixml.hpp", "../src/pugiconfig.hpp", "../src/pugixml.cpp" } - flags { "NoPCH", "NoMinimalRebuild" } + flags { "NoPCH", "NoMinimalRebuild", "NoEditAndContinue", "Symbols" } uuid "89A1E353-E2DC-495C-B403-742BE206ACED" configuration "Debug" defines { "_DEBUG" } - flags { "Symbols" } configuration "Release" defines { "NDEBUG" } |