Merge topic 'ninja-autogen'
4d08e6b6 QtAutogen: Fix rcc rebuild with Ninja generator (#15459)
This commit is contained in:
commit
a3bdb5578d
@ -374,7 +374,9 @@ bool cmQtAutoGenerators::InitializeAutogenTarget(cmTarget* target)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
std::vector<std::string> rcc_output;
|
std::vector<std::string> rcc_output;
|
||||||
if(makefile->GetLocalGenerator()->GetGlobalGenerator()->GetName() == "Ninja"
|
bool const isNinja =
|
||||||
|
makefile->GetLocalGenerator()->GetGlobalGenerator()->GetName() == "Ninja";
|
||||||
|
if(isNinja
|
||||||
#if defined(_WIN32) && !defined(__CYGWIN__)
|
#if defined(_WIN32) && !defined(__CYGWIN__)
|
||||||
|| usePRE_BUILD
|
|| usePRE_BUILD
|
||||||
#endif
|
#endif
|
||||||
@ -444,7 +446,7 @@ bool cmQtAutoGenerators::InitializeAutogenTarget(cmTarget* target)
|
|||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
cmTarget* autogenTarget = 0;
|
cmTarget* autogenTarget = 0;
|
||||||
if (!rcc_output.empty())
|
if (!rcc_output.empty() && !isNinja)
|
||||||
{
|
{
|
||||||
std::vector<std::string> no_byproducts;
|
std::vector<std::string> no_byproducts;
|
||||||
makefile->AddCustomCommandToOutput(rcc_output, no_byproducts,
|
makefile->AddCustomCommandToOutput(rcc_output, no_byproducts,
|
||||||
@ -464,7 +466,8 @@ bool cmQtAutoGenerators::InitializeAutogenTarget(cmTarget* target)
|
|||||||
{
|
{
|
||||||
autogenTarget = makefile->AddUtilityCommand(
|
autogenTarget = makefile->AddUtilityCommand(
|
||||||
autogenTargetName, true,
|
autogenTargetName, true,
|
||||||
workingDirectory.c_str(), depends,
|
workingDirectory.c_str(),
|
||||||
|
/*byproducts=*/rcc_output, depends,
|
||||||
commandLines, false, autogenComment.c_str());
|
commandLines, false, autogenComment.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user