Mono: Fix the windows cmake build. (#43658)
authorZoltan Varga <vargaz@gmail.com>
Wed, 21 Oct 2020 08:58:48 +0000 (04:58 -0400)
committerGitHub <noreply@github.com>
Wed, 21 Oct 2020 08:58:48 +0000 (10:58 +0200)
This will not use cmake on windows, it just fixes the conditionals so the windows build doesn't fail if cmake is enabled by default.

src/mono/mono.proj

index 1377c55..210352a 100644 (file)
@@ -6,8 +6,7 @@
   -->
 
   <PropertyGroup>
-    <!--<MonoEnableCMake Condition="'$(TargetsBrowser)' == 'true' or '$(TargetsOSX)' == 'true' or '$(TargetsAndroid)' == 'true' or '$(TargetsiOS)' == 'true' or '$(TargetstvOS)' == 'true'">true</MonoEnableCMake>-->
-    <MonoEnableCMake Condition="'$(TargetsWindows)' != 'true'">true</MonoEnableCMake>
+    <MonoEnableCMake>true</MonoEnableCMake>
     <MonoCrossDir Condition="'$(MonoCrossDir)' == '' and '$(ROOTFS_DIR)' != ''">$(ROOTFS_DIR)</MonoCrossDir>
     <MonoEnableInterpreter Condition="'$(MonoEnableInterpreter)' == ''">false</MonoEnableInterpreter>
     <ScriptExt Condition="'$(OS)' == 'Windows_NT'">.cmd</ScriptExt>
   </Target>
 
   <!-- Windows Mono runtime build -->
-  <Target Name="BuildMonoRuntimeWindows" Condition="'$(OS)' == 'Windows_NT' and '$(MonoEnableCMake)' != 'true'">
+  <Target Name="BuildMonoRuntimeWindows" Condition="'$(OS)' == 'Windows_NT'">
 
     <!-- Sanity checks -->
     <Error Condition="'$(TargetsiOS)' == 'true' or '$(TargetstvOS)' == 'true'" Text="Error: Mono runtime for $(TargetOS) can't be built on Windows." />
     <Exec Condition="'$(OS)' != 'Windows_NT'" Command="$(MonoProjectRoot)../tests/run.sh $(CoreClrTestConfig)" ContinueOnError="ErrorAndContinue" />
   </Target>
 
-  <Target Name="BuildMonoRuntimeCMake" Condition="'$(MonoEnableCMake)' == 'true'">
+  <Target Name="BuildMonoRuntimeCMake" Condition="'$(OS)' != 'Windows_NT' and '$(MonoEnableCMake)' == 'true'">
     <Exec Command="which ninja" IgnoreExitCode="true" IgnoreStandardErrorWarningFormat="true">
       <Output TaskParameter="ExitCode" PropertyName="MonoNinjaFound"/>
     </Exec>