<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

  <PropertyGroup Label="Globals">
    <_PropertySheetDisplayName>GSL Common Settings</_PropertySheetDisplayName>
    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
    <RunCodeAnalysis>false</RunCodeAnalysis>
  </PropertyGroup>

  <!-- Configuration -->

  <ItemDefinitionGroup>
    <ClCompile>
      <AdditionalIncludeDirectories>$(RepoRoot)src\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
      <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
      <EnablePREfast>false</EnablePREfast>
      <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>

      <!-- workaround for pcre packaging bug -->
      <PreprocessorDefinitions Condition="'$(Linkage-pcre)' == 'ltcg'">PCRE_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
    </ClCompile>
  </ItemDefinitionGroup>

  <!-- Dependencies -->
  
  <PropertyGroup Condition="'$(DefaultLinkage)' == 'dynamic'">
    <Linkage-pcre>dynamic</Linkage-pcre>
  </PropertyGroup>
  <PropertyGroup Condition="'$(DefaultLinkage)' == 'ltcg'">
    <Linkage-pcre>ltcg</Linkage-pcre>
  </PropertyGroup>
  <PropertyGroup Condition="'$(DefaultLinkage)' == 'static'">
    <Linkage-pcre>static</Linkage-pcre>
  </PropertyGroup>
  
  <!-- Messages -->

  <Target Name="OptionsInfo" BeforeTargets="PrepareForBuild">
    <Message Text="UTFwidth-pcre     : $(UTFwidth-pcre)" Importance="high"/>
  </Target>

  <Target Name="LinkageInfo" BeforeTargets="PrepareForBuild">
    <Message Text="Linkage-pcre      : $(Linkage-pcre)" Importance="high"/>
  </Target>

</Project>