diff options
Diffstat (limited to 'Source/cmGlobalKdevelopGenerator.cxx')
-rw-r--r-- | Source/cmGlobalKdevelopGenerator.cxx | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/Source/cmGlobalKdevelopGenerator.cxx b/Source/cmGlobalKdevelopGenerator.cxx index 138ddbb..018ab24 100644 --- a/Source/cmGlobalKdevelopGenerator.cxx +++ b/Source/cmGlobalKdevelopGenerator.cxx @@ -49,10 +49,9 @@ void cmGlobalKdevelopGenerator::Generate() it!= this->GlobalGenerator->GetProjectMap().end(); ++it) { - cmMakefile* mf = it->second[0]->GetMakefile(); - std::string outputDir=mf->GetCurrentBinaryDirectory(); - std::string projectDir=mf->GetHomeDirectory(); - std::string projectName=mf->GetProjectName(); + std::string outputDir=it->second[0]->GetCurrentBinaryDirectory(); + std::string projectDir=it->second[0]->GetSourceDirectory(); + std::string projectName=it->second[0]->GetProjectName(); std::string cmakeFilePattern("CMakeLists.txt;*.cmake;"); std::string fileToOpen; const std::vector<cmLocalGenerator*>& lgs= it->second; @@ -69,14 +68,14 @@ void cmGlobalKdevelopGenerator::Generate() for (std::vector<cmLocalGenerator*>::const_iterator lg=lgs.begin(); lg!=lgs.end(); lg++) { - cmMakefile* makefile=(*lg)->GetMakefile(); - cmGeneratorTargetsType const& targets = makefile->GetGeneratorTargets(); - for (cmGeneratorTargetsType::const_iterator ti = targets.begin(); - ti != targets.end(); ti++) + std::vector<cmGeneratorTarget*> const& targets = + (*lg)->GetGeneratorTargets(); + for (std::vector<cmGeneratorTarget*>::const_iterator ti = + targets.begin(); ti != targets.end(); ti++) { - if (ti->second->GetType()==cmTarget::EXECUTABLE) + if ((*ti)->GetType()==cmState::EXECUTABLE) { - executable = ti->second->GetLocation(""); + executable = (*ti)->GetLocation(""); break; } } @@ -106,6 +105,9 @@ bool cmGlobalKdevelopGenerator std::set<std::string> files; std::string tmp; + std::vector<std::string> hdrExts = + this->GlobalGenerator->GetCMakeInstance()->GetHeaderExtensions(); + for (std::vector<cmLocalGenerator*>::const_iterator it=lgs.begin(); it!=lgs.end(); it++) { @@ -134,12 +136,13 @@ bool cmGlobalKdevelopGenerator } //get all sources - cmTargets& targets=makefile->GetTargets(); - for (cmTargets::iterator ti = targets.begin(); + std::vector<cmGeneratorTarget*> targets=(*it)->GetGeneratorTargets(); + for (std::vector<cmGeneratorTarget*>::iterator ti = targets.begin(); ti != targets.end(); ti++) { std::vector<cmSourceFile*> sources; - ti->second.GetSourceFiles(sources, ti->second.GetMakefile() + cmGeneratorTarget* gt = *ti; + gt->GetSourceFiles(sources, gt->Target->GetMakefile() ->GetSafeDefinition("CMAKE_BUILD_TYPE")); for (std::vector<cmSourceFile*>::const_iterator si=sources.begin(); si!=sources.end(); si++) @@ -160,8 +163,7 @@ bool cmGlobalKdevelopGenerator // check if there's a matching header around for(std::vector<std::string>::const_iterator - ext = makefile->GetHeaderExtensions().begin(); - ext != makefile->GetHeaderExtensions().end(); ++ext) + ext = hdrExts.begin(); ext != hdrExts.end(); ++ext) { std::string hname=headerBasename; hname += "."; |