mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-24 23:28:32 -05:00
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 `$<TARGET_LINKER_FILE:>` to avoid the query for the unset property.
This commit is contained in:
@@ -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("$<TARGET_LINKER_FILE:", t->GetName(), ">");
|
||||
}
|
||||
}
|
||||
dependencies.push_back(depname);
|
||||
}
|
||||
|
||||
cmTarget* timestampTarget = this->LocalGen->AddUtilityCommand(
|
||||
|
||||
Reference in New Issue
Block a user