diff --git a/Source/cmExtraEclipseCDT4Generator.cxx b/Source/cmExtraEclipseCDT4Generator.cxx index 689f213de..96b8a0920 100644 --- a/Source/cmExtraEclipseCDT4Generator.cxx +++ b/Source/cmExtraEclipseCDT4Generator.cxx @@ -889,6 +889,10 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const for (cmGeneratorTargetsType::iterator l = targets.begin(); l != targets.end(); ++l) { + if (l->first->IsImported()) + { + continue; + } std::vector includeDirs; const char *config = mf->GetDefinition("CMAKE_BUILD_TYPE"); (*it)->GetIncludeDirectories(includeDirs, l->second, "C", config); diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 23ec08a2d..b9de4d8aa 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -1108,6 +1108,16 @@ void cmGlobalGenerator::CreateGeneratorTargets() this->ComputeTargetObjects(gt); generatorTargets[t] = gt; } + + for(std::vector::const_iterator + j = mf->GetOwnedImportedTargets().begin(); + j != mf->GetOwnedImportedTargets().end(); ++j) + { + cmGeneratorTarget* gt = new cmGeneratorTarget(*j); + this->GeneratorTargets[*j] = gt; + generatorTargets[*j] = gt; + } + mf->SetGeneratorTargets(generatorTargets); } } diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 4f4f7252b..4952a8ce9 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -745,6 +745,10 @@ void cmLocalGenerator for(cmGeneratorTargetsType::iterator l = tgts.begin(); l != tgts.end(); l++) { + if (l->first->IsImported()) + { + continue; + } cmGeneratorTarget& target = *l->second; switch(target.GetType()) {