summaryrefslogtreecommitdiffstats
path: root/Source/cmQtAutoGenInitializer.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-09-27 17:48:33 (GMT)
committerKitware Robot <kwrobot@kitware.com>2021-09-27 17:48:57 (GMT)
commita21d5455c027b7edb0c97893be4d5b286032310c (patch)
treecf5bc2440400000340148afc3f2fdd2db174e43c /Source/cmQtAutoGenInitializer.cxx
parent16b54616ca5f3bb9d25d809c356475ecbad59044 (diff)
parent895fa3433f50b7011fa475a4696dc06fe072aa25 (diff)
downloadCMake-a21d5455c027b7edb0c97893be4d5b286032310c.zip
CMake-a21d5455c027b7edb0c97893be4d5b286032310c.tar.gz
CMake-a21d5455c027b7edb0c97893be4d5b286032310c.tar.bz2
Merge topic 'autogen-dep-on-imported-implib-only-target'
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/cmQtAutoGenInitializer.cxx')
-rw-r--r--Source/cmQtAutoGenInitializer.cxx11
1 files changed, 10 insertions, 1 deletions
diff --git a/Source/cmQtAutoGenInitializer.cxx b/Source/cmQtAutoGenInitializer.cxx
index 33ce314..c49cafe 100644
--- a/Source/cmQtAutoGenInitializer.cxx
+++ b/Source/cmQtAutoGenInitializer.cxx
@@ -1309,7 +1309,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(