diff --git a/Modules/Platform/Windows-GNU.cmake b/Modules/Platform/Windows-GNU.cmake index c0d7d8cd8..b571b16ae 100644 --- a/Modules/Platform/Windows-GNU.cmake +++ b/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() diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx index 4c51d2333..771ecc402 100644 --- a/Source/cmNinjaNormalTargetGenerator.cxx +++ b/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);