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)
This commit is contained in:
Brad King 2015-05-12 09:12:41 -04:00 committed by CMake Topic Stage
commit cca3bbde98
2 changed files with 2 additions and 2 deletions

View File

@ -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()

View File

@ -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);