mirror of
https://github.com/zeux/pugixml.git
synced 2025-01-13 17:37:58 +08:00
Add "Include pugixml.cpp" and "Header Only" linkage options
This commit is contained in:
parent
5e64076af9
commit
ab86960e48
@ -10,6 +10,8 @@
|
||||
<EnumProperty Name="Linkage-pugixml" DisplayName="Linkage" Description="Which version of the runtime library to use for this library" Category="pugixml">
|
||||
<EnumValue Name="dynamic" DisplayName="Dynamic CRT (/MD, /MDd)" />
|
||||
<EnumValue Name="static" DisplayName="Static CRT (/MT, /MTd)" />
|
||||
<EnumValue Name="source" DisplayName="Include pugixml.cpp" />
|
||||
<EnumValue Name="header" DisplayName="Header Only" />
|
||||
</EnumProperty>
|
||||
</Rule>
|
||||
</ProjectSchemaDefinitions>
|
||||
|
@ -2,26 +2,27 @@
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup Label="Default initializers for properties">
|
||||
<Linkage-pugixml Condition="'$(Linkage-pugixml)' == ''">dynamic</Linkage-pugixml>
|
||||
<Configuration-pugixml Condition="$(Configuration.ToLower().IndexOf('debug')) != -1">Debug</Configuration-pugixml>
|
||||
<Configuration-pugixml Condition="$(Configuration.ToLower().IndexOf('debug')) == -1">Release</Configuration-pugixml>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PropertyPageSchema Include="$(MSBuildThisFileDirectory)\pugixml-propertiesui.xml" />
|
||||
</ItemGroup>
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>$(MSBuildThisFileDirectory)include/;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Linkage-pugixml)' == 'header'">PUGIXML_HEADER_ONLY;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>$(MSBuildThisFileDirectory)include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<AdditionalIncludeDirectories>$(MSBuildThisFileDirectory)include/;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(MSBuildThisFileDirectory)include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ResourceCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="$(Configuration.ToLower().IndexOf('debug')) != -1">
|
||||
<ItemGroup Condition="'$(Linkage-pugixml)' == 'source'">
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)include\pugixml.cpp"/>
|
||||
</ItemGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Linkage-pugixml)' != 'header' AND '$(Linkage-pugixml)' != 'source'">
|
||||
<Link>
|
||||
<AdditionalDependencies>$(MSBuildThisFileDirectory)lib/$(Platform)\$(PlatformToolset.Split('_')[0])\$(Linkage-pugixml)\Debug\pugixml.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="$(Configuration.ToLower().IndexOf('debug')) == -1">
|
||||
<Link>
|
||||
<AdditionalDependencies>$(MSBuildThisFileDirectory)lib/$(Platform)\$(PlatformToolset.Split('_')[0])\$(Linkage-pugixml)\Release\pugixml.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>$(MSBuildThisFileDirectory)lib/$(Platform)\$(PlatformToolset.Split('_')[0])\$(Linkage-pugixml)\$(Configuration-pugixml)\pugixml.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
</Project>
|
||||
|
@ -33,6 +33,7 @@ cd $scriptdir
|
||||
|
||||
Force-Copy "../src/pugiconfig.hpp" "nuget/build/native/include/pugiconfig.hpp"
|
||||
Force-Copy "../src/pugixml.hpp" "nuget/build/native/include/pugixml.hpp"
|
||||
Force-Copy "../src/pugixml.cpp" "nuget/build/native/include/pugixml.cpp"
|
||||
|
||||
if ($args[0] -eq 2019){
|
||||
Build-Version "vs2019" "v142" "dynamic"
|
||||
|
Loading…
x
Reference in New Issue
Block a user