From 158236b1da3be07360aa4af66575e72cabf2ecf9 Mon Sep 17 00:00:00 2001 From: "arseny.kapoulkine" Date: Thu, 10 Jun 2010 07:23:01 +0000 Subject: 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 --- scripts/CMakeLists.txt | 5 + scripts/premake4.lua | 61 ++++ scripts/pugixml_vs2002.vcproj | 247 ++++++++++++++++ scripts/pugixml_vs2003.vcproj | 283 ++++++++++++++++++ scripts/pugixml_vs2005.vcproj | 645 +++++++++++++++++++++++++++++++++++++++++ scripts/pugixml_vs2008.vcproj | 637 ++++++++++++++++++++++++++++++++++++++++ scripts/pugixml_vs2010.vcxproj | 296 +++++++++++++++++++ 7 files changed, 2174 insertions(+) create mode 100644 scripts/CMakeLists.txt create mode 100644 scripts/premake4.lua create mode 100644 scripts/pugixml_vs2002.vcproj create mode 100644 scripts/pugixml_vs2003.vcproj create mode 100644 scripts/pugixml_vs2005.vcproj create mode 100644 scripts/pugixml_vs2008.vcproj create mode 100644 scripts/pugixml_vs2010.vcxproj diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt new file mode 100644 index 0000000..a589a93 --- /dev/null +++ b/scripts/CMakeLists.txt @@ -0,0 +1,5 @@ +project(pugixml) + +set(SOURCES ../src/pugixml.hpp ../src/pugiconfig.hpp ../src/pugixml.cpp ../src/pugixpath.cpp) + +add_library(pugixml STATIC ${SOURCES}) 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" } diff --git a/scripts/pugixml_vs2002.vcproj b/scripts/pugixml_vs2002.vcproj new file mode 100644 index 0000000..ba3881d --- /dev/null +++ b/scripts/pugixml_vs2002.vcproj @@ -0,0 +1,247 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/scripts/pugixml_vs2003.vcproj b/scripts/pugixml_vs2003.vcproj new file mode 100644 index 0000000..20f2cfd --- /dev/null +++ b/scripts/pugixml_vs2003.vcproj @@ -0,0 +1,283 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/scripts/pugixml_vs2005.vcproj b/scripts/pugixml_vs2005.vcproj new file mode 100644 index 0000000..2913d19 --- /dev/null +++ b/scripts/pugixml_vs2005.vcproj @@ -0,0 +1,645 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/scripts/pugixml_vs2008.vcproj b/scripts/pugixml_vs2008.vcproj new file mode 100644 index 0000000..25f43b1 --- /dev/null +++ b/scripts/pugixml_vs2008.vcproj @@ -0,0 +1,637 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/scripts/pugixml_vs2010.vcxproj b/scripts/pugixml_vs2010.vcxproj new file mode 100644 index 0000000..f3d6dcb --- /dev/null +++ b/scripts/pugixml_vs2010.vcxproj @@ -0,0 +1,296 @@ + + + + + DebugStatic + Win32 + + + DebugStatic + x64 + + + Debug + Win32 + + + Debug + x64 + + + ReleaseStatic + Win32 + + + ReleaseStatic + x64 + + + Release + Win32 + + + Release + x64 + + + + pugixml + {89A1E353-E2DC-495C-B403-742BE206ACED} + pugixml + Win32Proj + + + + StaticLibrary + MultiByte + + + StaticLibrary + MultiByte + + + StaticLibrary + MultiByte + + + StaticLibrary + MultiByte + + + 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\ + 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 + + + + Disabled + _DEBUG;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + true + + + Level3 + $(OutDir)pugixml_d.pdb + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + + + + + + X64 + + + Disabled + _DEBUG;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + true + + + Level3 + $(OutDir)pugixml_d.pdb + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + + + + + + Full + NDEBUG;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + + + Level3 + $(OutDir)pugixml.pdb + ProgramDatabase + + + NDEBUG;%(PreprocessorDefinitions) + + + + + + X64 + + + Full + NDEBUG;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + + + Level3 + $(OutDir)pugixml.pdb + ProgramDatabase + + + NDEBUG;%(PreprocessorDefinitions) + + + + + + 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) + + + + + + + + + + + + + + + -- cgit v1.2.3