Преглед на файлове

Merge topic 'ninja-gcc-windows'

cf8ce7a3 RC: Do not override MinGW Makefiles generator preference
ca658a45 Ninja: Use forward slashes for linking with any GCC on Windows (#15439)
Brad King преди 10 години
родител
ревизия
cca3bbde98
променени са 2 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. 1 1
      Modules/Platform/Windows-GNU.cmake
  2. 1 1
      Source/cmNinjaNormalTargetGenerator.cxx

+ 1 - 1
Modules/Platform/Windows-GNU.cmake

@@ -138,7 +138,7 @@ macro(__windows_compiler_gnu lang)
     endforeach()
   endif()
 
-  if(NOT CMAKE_RC_COMPILER_INIT)
+  if(NOT CMAKE_RC_COMPILER_INIT AND NOT CMAKE_GENERATOR_RC)
     set(CMAKE_RC_COMPILER_INIT windres)
   endif()
 

+ 1 - 1
Source/cmNinjaNormalTargetGenerator.cxx

@@ -565,7 +565,7 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement()
     vars["TARGET_PDB"] = base + suffix + dbg_suffix;
     }
 
-  if (mf->IsOn("CMAKE_COMPILER_IS_MINGW"))
+  if (this->GetGlobalGenerator()->IsGCCOnWindows())
     {
     const std::string objPath = GetTarget()->GetSupportDirectory();
     vars["OBJECT_DIR"] = ConvertToNinjaPath(objPath);