Преглед изворни кода

VS: Make CMAKE_GENERATOR_INSTANCE usable without VS Installer

On Windows and Wine, both the COM interface and `vswhere` might not be
available.  `CMAKE_GENERATOR_INSTANCE` is still supposed to work since
commit 195d47e213 (VS: Allow CMAKE_GENERATOR_INSTANCE to specify
portable instance, 2021-10-21, v3.23.0-rc1~452^2).

Issue: #21639
huangqinjin пре 1 година
родитељ
комит
e801d2b243
1 измењених фајлова са 2 додато и 1 уклоњено
  1. 2 1
      Source/cmVSSetupHelper.cxx

+ 2 - 1
Source/cmVSSetupHelper.cxx

@@ -450,7 +450,8 @@ bool cmVSSetupAPIHelper::EnumerateAndChooseVSInstance()
 
   // Enumerate VS instances with either COM interface or Vswhere
   if (!EnumerateVSInstancesWithCOM(vecVSInstancesAll) &&
-      !EnumerateVSInstancesWithVswhere(vecVSInstancesAll)) {
+      !EnumerateVSInstancesWithVswhere(vecVSInstancesAll) &&
+      this->SpecifiedVSInstallLocation.empty()) {
     return false;
   }