File tree Expand file tree Collapse file tree 3 files changed +18
-10
lines changed Expand file tree Collapse file tree 3 files changed +18
-10
lines changed Original file line number Diff line number Diff line change 1
1
<?xml version =" 1.0" encoding =" utf-8" ?>
2
2
<Project >
3
+ <PropertyGroup Condition =" $([MSBuild]::IsOSPlatform ('windows')) And '$(VSINSTALLROOT)' != '' " >
4
+ <_VcvarsallPath >$(VSINSTALLROOT)\VC\Auxiliary\Build\vcvarsall.bat</_VcvarsallPath >
5
+ </PropertyGroup >
6
+
7
+ <PropertyGroup Condition =" $([MSBuild]::IsOSPlatform ('windows')) And Exists ('$(_VcvarsallPath)') " >
8
+ <NativeToolchainSupported >True</NativeToolchainSupported >
9
+ </PropertyGroup >
10
+
11
+ <PropertyGroup Condition =" !$([MSBuild]::IsOSPlatform ('windows')) " >
12
+ <NativeToolchainSupported >True</NativeToolchainSupported >
13
+ </PropertyGroup >
14
+
3
15
<Target Name =" GetNativeBuildCommands" >
4
- <ItemGroup Condition =" '$(VSINSTALLROOT)' != '' And Exists('$(VSINSTALLROOT)') " >
5
- <_Vcvarsall
6
- Include =" $(VSINSTALLROOT)\VC\Auxiliary\Build\vcvarsall.bat"
7
- />
8
- </ItemGroup >
9
- <PropertyGroup Condition =" '@(_Vcvarsall->Count())' != '0' " >
10
- <_Vcvarsall >%(_Vcvarsall.Identity)</_Vcvarsall >
11
- <PrepareNativeToolchain >call "$(_Vcvarsall)" </PrepareNativeToolchain >
16
+ <PropertyGroup Condition =" Exists ('$(_VcvarsallPath)') " >
17
+ <PrepareNativeToolchain >call "$(_VcvarsallPath)" </PrepareNativeToolchain >
12
18
</PropertyGroup >
13
19
<PropertyGroup >
14
20
<CmakeGenerator Condition =" $([MSBuild]::IsOSPlatform ('windows')) " >-G "NMake Makefiles"</CmakeGenerator >
Original file line number Diff line number Diff line change 23
23
<_JavaInteropNativeLib Include =" CMakeLists.txt" />
24
24
</ItemGroup >
25
25
26
- <ItemGroup >
26
+ <ItemGroup Condition = " '$(NativeToolchainSupported)' == 'True' " >
27
27
<None Include =" @(_JavaInteropNativeLib->'$(OutputPath)%(Dir)$(_JavaInteropLibName)')" >
28
28
<CopyToOutputDirectory >PreserveNewest</CopyToOutputDirectory >
29
29
<Link >%(Dir)$(_JavaInteropLibName)</Link >
60
60
</Target >
61
61
62
62
<Target Name =" _BuildLibs"
63
+ Condition =" '$(NativeToolchainSupported)' == 'True' "
63
64
DependsOnTargets =" GetNativeBuildCommands;_BuildJni_c;_GetCmakeOptions"
64
65
BeforeTargets =" Build"
65
66
Inputs =" @(_JavaInteropNativeLib);$(MSBuildThisFileFullPath);java-interop.csproj;@(ClInclude);@(ClCompile)"
Original file line number Diff line number Diff line change 23
23
<_NativeTimingLib Include =" CMakeLists.txt" />
24
24
</ItemGroup >
25
25
26
- <ItemGroup >
26
+ <ItemGroup Condition = " '$(NativeToolchainSupported)' == 'True' " >
27
27
<None Include =" @(_NativeTimingLib->'$(OutputPath)%(Dir)$(_NativeTimingLibName)')" >
28
28
<CopyToOutputDirectory >PreserveNewest</CopyToOutputDirectory >
29
29
<Link >%(Dir)$(_NativeTimingLibName)</Link >
40
40
</ItemGroup >
41
41
42
42
<Target Name =" _BuildLibs"
43
+ Condition =" '$(NativeToolchainSupported)' == 'True' "
43
44
BeforeTargets =" Build"
44
45
DependsOnTargets =" GetNativeBuildCommands"
45
46
Inputs =" @(_NativeTimingLib);$(MSBuildThisFileFullPath);NativeTiming.csproj;@(ClInclude);@(ClCompile)"
You can’t perform that action at this time.
0 commit comments