summaryrefslogtreecommitdiffstats
path: root/Source/cmInstallCommand.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmInstallCommand.cxx')
-rw-r--r--Source/cmInstallCommand.cxx15
1 files changed, 11 insertions, 4 deletions
diff --git a/Source/cmInstallCommand.cxx b/Source/cmInstallCommand.cxx
index 3c76bd6..6f2dd65 100644
--- a/Source/cmInstallCommand.cxx
+++ b/Source/cmInstallCommand.cxx
@@ -363,7 +363,7 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args)
++targetIt)
{
- if (this->Makefile->IsAlias(targetIt->c_str()))
+ if (this->Makefile->IsAlias(*targetIt))
{
cmOStringStream e;
e << "TARGETS given target \"" << (*targetIt)
@@ -372,14 +372,15 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args)
return false;
}
// Lookup this target in the current directory.
- if(cmTarget* target=this->Makefile->FindTarget(targetIt->c_str()))
+ if(cmTarget* target=this->Makefile->FindTarget(*targetIt))
{
// Found the target. Check its type.
if(target->GetType() != cmTarget::EXECUTABLE &&
target->GetType() != cmTarget::STATIC_LIBRARY &&
target->GetType() != cmTarget::SHARED_LIBRARY &&
target->GetType() != cmTarget::MODULE_LIBRARY &&
- target->GetType() != cmTarget::OBJECT_LIBRARY)
+ target->GetType() != cmTarget::OBJECT_LIBRARY &&
+ target->GetType() != cmTarget::INTERFACE_LIBRARY)
{
cmOStringStream e;
e << "TARGETS given target \"" << (*targetIt)
@@ -626,6 +627,11 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args)
}
}
break;
+ case cmTarget::INTERFACE_LIBRARY:
+ // Nothing to do. An INTERFACE_LIBRARY can be installed, but the
+ // only effect of that is to make it exportable. It installs no
+ // other files itself.
+ break;
default:
// This should never happen due to the above type check.
// Ignore the case.
@@ -639,7 +645,8 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args)
// generators for them.
bool createInstallGeneratorsForTargetFileSets = true;
- if(target.IsFrameworkOnApple())
+ if(target.IsFrameworkOnApple()
+ || target.GetType() == cmTarget::INTERFACE_LIBRARY)
{
createInstallGeneratorsForTargetFileSets = false;
}