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
diff --git a/scripts/pugixml_vs2005.vcproj b/scripts/pugixml_vs2005.vcproj
index 2913d19..d5eecfd 100644
--- a/scripts/pugixml_vs2005.vcproj
+++ b/scripts/pugixml_vs2005.vcproj
@@ -316,304 +316,6 @@
Name="VCPostBuildEventTool"
/>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/scripts/pugixml_vs2002.vcproj b/scripts/pugixml_vs2005_static.vcproj
similarity index 57%
rename from scripts/pugixml_vs2002.vcproj
rename to scripts/pugixml_vs2005_static.vcproj
index ba3881d..05c5604 100644
--- a/scripts/pugixml_vs2002.vcproj
+++ b/scripts/pugixml_vs2005_static.vcproj
@@ -1,220 +1,320 @@
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/scripts/pugixml_vs2008.vcproj b/scripts/pugixml_vs2008.vcproj
index 25f43b1..868b2a7 100644
--- a/scripts/pugixml_vs2008.vcproj
+++ b/scripts/pugixml_vs2008.vcproj
@@ -312,300 +312,6 @@
Name="VCPostBuildEventTool"
/>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/scripts/pugixml_vs2003.vcproj b/scripts/pugixml_vs2008_static.vcproj
similarity index 64%
rename from scripts/pugixml_vs2003.vcproj
rename to scripts/pugixml_vs2008_static.vcproj
index 20f2cfd..c888120 100644
--- a/scripts/pugixml_vs2003.vcproj
+++ b/scripts/pugixml_vs2008_static.vcproj
@@ -1,255 +1,315 @@
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/scripts/pugixml_vs2010.vcxproj b/scripts/pugixml_vs2010.vcxproj
index f3d6dcb..faa0066 100644
--- a/scripts/pugixml_vs2010.vcxproj
+++ b/scripts/pugixml_vs2010.vcxproj
@@ -1,14 +1,6 @@
-
- DebugStatic
- Win32
-
-
- DebugStatic
- x64
-
Debug
Win32
@@ -17,14 +9,6 @@
Debug
x64
-
- ReleaseStatic
- Win32
-
-
- ReleaseStatic
- x64
-
Release
Win32
@@ -41,14 +25,6 @@
Win32Proj
-
- StaticLibrary
- MultiByte
-
-
- StaticLibrary
- MultiByte
-
StaticLibrary
MultiByte
@@ -57,14 +33,6 @@
StaticLibrary
MultiByte
-
- StaticLibrary
- MultiByte
-
-
- StaticLibrary
- MultiByte
-
StaticLibrary
MultiByte
@@ -76,24 +44,12 @@
-
-
-
-
-
-
-
-
-
-
-
-
@@ -111,20 +67,8 @@
vs2010\x32\Release\
vs2010\x64\
vs2010\x64\Release\
- vs2010\x32\
- vs2010\x32\DebugStatic\
- vs2010\x64\
- vs2010\x64\DebugStatic\
- vs2010\x32\
- vs2010\x32\ReleaseStatic\
- vs2010\x64\
- vs2010\x64\ReleaseStatic\
$(ProjectName)_d
$(ProjectName)_d
- $(ProjectName)_sd
- $(ProjectName)_sd
- $(ProjectName)_s
- $(ProjectName)_s
@@ -204,84 +148,6 @@
-
-
- Disabled
- _DEBUG;%(PreprocessorDefinitions)
- EnableFastChecks
- MultiThreadedDebug
- true
-
-
- Level3
- $(OutDir)pugixml_sd.pdb
- ProgramDatabase
-
-
- _DEBUG;%(PreprocessorDefinitions)
-
-
-
-
-
- X64
-
-
- Disabled
- _DEBUG;%(PreprocessorDefinitions)
- EnableFastChecks
- MultiThreadedDebug
- true
-
-
- Level3
- $(OutDir)pugixml_sd.pdb
- ProgramDatabase
-
-
- _DEBUG;%(PreprocessorDefinitions)
-
-
-
-
-
- Full
- NDEBUG;%(PreprocessorDefinitions)
- true
- MultiThreaded
- true
-
-
- Level3
- $(OutDir)pugixml_s.pdb
- ProgramDatabase
-
-
- NDEBUG;%(PreprocessorDefinitions)
-
-
-
-
-
- X64
-
-
- Full
- NDEBUG;%(PreprocessorDefinitions)
- true
- MultiThreaded
- true
-
-
- Level3
- $(OutDir)pugixml_s.pdb
- ProgramDatabase
-
-
- NDEBUG;%(PreprocessorDefinitions)
-
-
-
@@ -293,4 +159,4 @@
-
+
\ No newline at end of file
diff --git a/scripts/pugixml_vs2010_static.vcxproj b/scripts/pugixml_vs2010_static.vcxproj
new file mode 100644
index 0000000..2659ef2
--- /dev/null
+++ b/scripts/pugixml_vs2010_static.vcxproj
@@ -0,0 +1,164 @@
+
+
+
+
+ Debug
+ Win32
+
+
+ Debug
+ x64
+
+
+ Release
+ Win32
+
+
+ Release
+ x64
+
+
+
+ pugixml
+ {89A1E353-E2DC-495C-B403-742BE206ACED}
+ pugixml
+ Win32Proj
+
+
+
+ StaticLibrary
+ MultiByte
+
+
+ StaticLibrary
+ MultiByte
+
+
+ StaticLibrary
+ MultiByte
+
+
+ StaticLibrary
+ MultiByte
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <_ProjectFileVersion>10.0.30319.1
+ vs2010\x32\
+ vs2010\x32\Debug\
+ vs2010\x64\
+ vs2010\x64\Debug\
+ vs2010\x32\
+ vs2010\x32\Release\
+ vs2010\x64\
+ vs2010\x64\Release\
+ $(ProjectName)_sd
+ $(ProjectName)_sd
+ $(ProjectName)_s
+ $(ProjectName)_s
+
+
+
+ Disabled
+ _DEBUG;%(PreprocessorDefinitions)
+ EnableFastChecks
+ MultiThreadedDebug
+ true
+
+
+ Level3
+ $(OutDir)pugixml_sd.pdb
+ ProgramDatabase
+
+
+ _DEBUG;%(PreprocessorDefinitions)
+
+
+
+
+
+ X64
+
+
+ Disabled
+ _DEBUG;%(PreprocessorDefinitions)
+ EnableFastChecks
+ MultiThreadedDebug
+ true
+
+
+ Level3
+ $(OutDir)pugixml_sd.pdb
+ ProgramDatabase
+
+
+ _DEBUG;%(PreprocessorDefinitions)
+
+
+
+
+
+ Full
+ NDEBUG;%(PreprocessorDefinitions)
+ true
+ MultiThreaded
+ true
+
+
+ Level3
+ $(OutDir)pugixml_s.pdb
+ ProgramDatabase
+
+
+ NDEBUG;%(PreprocessorDefinitions)
+
+
+
+
+
+ X64
+
+
+ Full
+ NDEBUG;%(PreprocessorDefinitions)
+ true
+ MultiThreaded
+ true
+
+
+ Level3
+ $(OutDir)pugixml_s.pdb
+ ProgramDatabase
+
+
+ NDEBUG;%(PreprocessorDefinitions)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+