diff options
author | arseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640> | 2010-06-10 07:23:01 +0000 |
---|---|---|
committer | arseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640> | 2010-06-10 07:23:01 +0000 |
commit | 158236b1da3be07360aa4af66575e72cabf2ecf9 (patch) | |
tree | d0cc5e4693634fe5cc4cdd940ad5991d829dc4ad /scripts/premake4.lua | |
parent | 47c17a25d934450a28fdceecaecf1100943381a9 (diff) |
scripts: Added build scripts for various build systems (CMake, premake, VS2002-2010)
git-svn-id: http://pugixml.googlecode.com/svn/trunk@506 99668b35-9821-0410-8761-19e4c4f06640
Diffstat (limited to 'scripts/premake4.lua')
-rw-r--r-- | scripts/premake4.lua | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/scripts/premake4.lua b/scripts/premake4.lua new file mode 100644 index 0000000..873497c --- /dev/null +++ b/scripts/premake4.lua @@ -0,0 +1,61 @@ +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
+
+ local action = premake.action.current()
+
+ if action then
+ -- Disable solution generation
+ function action.onsolution(sln)
+ sln.vstudio_configs = premake.vstudio_buildconfigs(sln)
+ end
+
+ -- Rename output file
+ function action.onproject(prj)
+ premake.generate(prj, "%%_" .. _ACTION .. ".vcproj", premake.vs200x_vcproj)
+ end
+ end
+end
+
+solution "pugixml"
+ objdir(_ACTION)
+ targetdir(_ACTION)
+
+if string.startswith(_ACTION, "vs") then
+ if _ACTION ~= "vs2002" and _ACTION ~= "vs2003" then
+ platforms { "x32", "x64" }
+
+ configuration "x32" targetdir(_ACTION .. "/x32")
+ configuration "x64" targetdir(_ACTION .. "/x64")
+ end
+
+ configurations { "Debug", "Release", "DebugStatic", "ReleaseStatic" }
+
+ configuration "DebugStatic" targetsuffix "_sd"
+ configuration "ReleaseStatic" targetsuffix "_s"
+ configuration "Debug" targetsuffix "_d"
+else
+ configurations { "Debug", "Release" }
+
+ configuration "Debug" targetsuffix "_d"
+end
+
+project "pugixml"
+ kind "StaticLib"
+ language "C++"
+ files { "../src/pugixml.hpp", "../src/pugiconfig.hpp", "../src/pugixml.cpp", "../src/pugixpath.cpp" }
+ flags { "NoPCH", "NoMinimalRebuild" }
+ uuid "89A1E353-E2DC-495C-B403-742BE206ACED"
+
+configuration "Debug*"
+ defines { "_DEBUG" }
+ flags { "Symbols" }
+
+configuration "Release*"
+ defines { "NDEBUG" }
+ flags { "Optimize" }
+
+configuration "*Static"
+ flags { "StaticRuntime" }
|