summaryrefslogtreecommitdiff
path: root/winbuild/pguser.Cpp.props
blob: 6e2824ce2532463afc5de5adb2f17037c50d7fc9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<!--
***********************************************************************************************
pguser.Cpp.props

	This project property sheet is to avoid a crash in the following case.
 
	1. Windows SDK 7.1 is installed
	2. Visual C++ (Express) 10 not installed
	3. Platformtoolset is Windows7.1SDK or v100
	4. Normal (non-C++ or SDK) Command prompt

	Unfortunately the property VSInstallDir wasn't determined because 
	of the above #2. Here we derive it from $(VCInstallDir) by removing
	the last 3 characters 'VC\'. Then we prepend
		$(VSInstallDir)Common7\ide and $(VSInstallDir)Common7\tools
	to the ExecutablePath property unless $(ExecutablePath) contains them.

	Added library legacy_stdio_definitions.lib for vc14 or later.
	Added ObjbaseDir property.
***********************************************************************************************
-->

<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <!-- PropertyGroup -->
  <PropertyGroup Condition="'$(VSInstallDir)'=='' And '$(VCInstallDir)'!='' And  ('$(PlatformToolset)'=='v100' Or '$(PlatformToolset)'=='Windows7.1SDK')">
    <VSInstallDir>$(VCInstallDir.Substring(0, $([MSBuild]::Subtract($(VCInstallDir.length),3))))</VSInstallDir>
    <VSIdePath>$(VSInstallDir)Common7\ide</VSIdePath>
    <ExecutablePath Condition="!$(ExecutablePath.ToLower().Contains($(VSIdePath.ToLower())))">$(VSIdePath);$(VSInstallDir)Common7\Tools;$(ExecutablePath)</ExecutablePath>
  </PropertyGroup>
  <PropertyGroup>
    <ObjbaseDir Condition="'$(PSQLODBC_OBJBASE)'!=''">$(PSQLODBC_OBJBASE)\</ObjbaseDir>
  </PropertyGroup>
  <ItemDefinitionGroup Condition="'$(PlatformToolset.Substring(1,1))'=='1'AND($(PlatformToolset.Substring(2,1).CompareTo('3'))>0)">
    <Link>
      <AdditionalDependencies>legacy_stdio_definitions.lib;%(AdditionalDependencies)</AdditionalDependencies>
    </Link>
  </ItemDefinitionGroup>
</Project>