summaryrefslogtreecommitdiff
path: root/xmake/scripts/vsxmake/vsproj/Xmake.Defaults.props
blob: 7026476392ebb76025ed4e6044d18c2b1a06cce0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

  <PropertyGroup Label="XmakePathsResolve">
    <_XmakeProgramDir>$(XmakeProgramDir)</_XmakeProgramDir>
    <_XmakeProjectDir>$(XmakeProjectDir)</_XmakeProjectDir>
    <_XmakeScriptDir>$(XmakeScriptDir)</_XmakeScriptDir>

    <!-- resolve if they are relative paths -->
    <_XmakeProgramDir Condition="!$([System.IO.Path]::IsPathRooted('$(_XmakeProgramDir)'))">$([System.IO.Path]::GetFullPath('$(MSBuildProjectDirectory)\$(_XmakeProgramDir)'))</_XmakeProgramDir>
    <_XmakeProjectDir Condition="!$([System.IO.Path]::IsPathRooted('$(_XmakeProjectDir)'))">$([System.IO.Path]::GetFullPath('$(MSBuildProjectDirectory)\$(_XmakeProjectDir)'))</_XmakeProjectDir>
    <_XmakeScriptDir Condition="!$([System.IO.Path]::IsPathRooted('$(_XmakeScriptDir)'))">$([System.IO.Path]::GetFullPath('$(MSBuildProjectDirectory)\$(_XmakeScriptDir)'))</_XmakeScriptDir>

    <!-- normalize paths -->
    <XmakeProgramDir>$([System.IO.Path]::GetFullPath('$(_XmakeProgramDir)'))</XmakeProgramDir>
    <XmakeProjectDir>$([System.IO.Path]::GetFullPath('$(_XmakeProjectDir)'))</XmakeProjectDir>
    <XmakeScriptDir>$([System.IO.Path]::GetFullPath('$(_XmakeScriptDir)'))</XmakeScriptDir>
  </PropertyGroup>

</Project>