diff options
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r-- | Source/cmTarget.cxx | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 136c43c..622e812 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -6467,6 +6467,15 @@ bool cmTarget::ComputeLinkInterface(const char* config, LinkInterface& iface, break; } } + else + { + iface.Libraries = impl->Libraries; + if(this->GetType() == cmTarget::STATIC_LIBRARY) + { + // Targets using this archive need its language runtime libraries. + iface.Languages = impl->Languages; + } + } } } @@ -6495,7 +6504,8 @@ bool cmTarget::ComputeLinkInterface(const char* config, LinkInterface& iface, headTarget, this, &dagChecker), iface.Libraries); - if(this->GetType() == cmTarget::SHARED_LIBRARY) + if(this->GetType() == cmTarget::SHARED_LIBRARY + || this->GetType() == cmTarget::STATIC_LIBRARY) { // Shared libraries may have runtime implementation dependencies // on other shared libraries that are not in the interface. @@ -6529,6 +6539,11 @@ bool cmTarget::ComputeLinkInterface(const char* config, LinkInterface& iface, } } } + if(this->GetType() == cmTarget::STATIC_LIBRARY) + { + // Targets using this archive need its language runtime libraries. + iface.Languages = impl->Languages; + } } } else if (this->GetPolicyStatusCMP0022() == cmPolicies::WARN |