diff options
author | Brad King <brad.king@kitware.com> | 2021-09-27 17:48:33 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2021-09-27 17:48:56 (GMT) |
commit | 12b999e66a8fded6f277271993c80bb9327dbfe2 (patch) | |
tree | 36664746693148a5f4b416f563156d5193ce7944 /Source | |
parent | afd4d25280af59169d885495c35dc5412294db9d (diff) | |
parent | 895fa3433f50b7011fa475a4696dc06fe072aa25 (diff) | |
download | CMake-12b999e66a8fded6f277271993c80bb9327dbfe2.zip CMake-12b999e66a8fded6f277271993c80bb9327dbfe2.tar.gz CMake-12b999e66a8fded6f277271993c80bb9327dbfe2.tar.bz2 |
Merge topic 'autogen-dep-on-imported-implib-only-target' into release-3.21
895fa3433f cmQtAutoGenInitializer: support IMPLIB-only imported targets
354c1f5628 Tests/RunCMake/Autogen: test CMP0111 behavior
Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !6558
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmQtAutoGenInitializer.cxx | 11 |
1 files changed, 10 insertions, 1 deletions
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("$<TARGET_LINKER_FILE:", t->GetName(), ">"); + } + } + dependencies.push_back(depname); } cmTarget* timestampTarget = this->LocalGen->AddUtilityCommand( |