From 895fa3433f50b7011fa475a4696dc06fe072aa25 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Thu, 23 Sep 2021 17:05:22 -0400 Subject: cmQtAutoGenInitializer: support IMPLIB-only imported targets Instead of using the target name directly (which ends up in the `Ninja` generators querying for the `LOCATION` parameter), wrap up the target name in a `$` to avoid the query for the unset property. --- Source/cmQtAutoGenInitializer.cxx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Source/cmQtAutoGenInitializer.cxx b/Source/cmQtAutoGenInitializer.cxx index 4dd78e5..4e3c584 100644 --- a/Source/cmQtAutoGenInitializer.cxx +++ b/Source/cmQtAutoGenInitializer.cxx @@ -1306,7 +1306,16 @@ bool cmQtAutoGenInitializer::InitAutogenTarget() // Add additional autogen target dependencies to // '_autogen_timestamp_deps'. for (const cmTarget* t : this->AutogenTarget.DependTargets) { - dependencies.push_back(t->GetName()); + std::string depname = t->GetName(); + if (t->IsImported()) { + auto ttype = t->GetType(); + if (ttype == cmStateEnums::TargetType::STATIC_LIBRARY || + ttype == cmStateEnums::TargetType::SHARED_LIBRARY || + ttype == cmStateEnums::TargetType::UNKNOWN_LIBRARY) { + depname = cmStrCat("$GetName(), ">"); + } + } + dependencies.push_back(depname); } cmTarget* timestampTarget = this->LocalGen->AddUtilityCommand( -- cgit v0.12