diff options
Diffstat (limited to 'Source/cmAddLibraryCommand.cxx')
-rw-r--r-- | Source/cmAddLibraryCommand.cxx | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/Source/cmAddLibraryCommand.cxx b/Source/cmAddLibraryCommand.cxx index a581ea1..f0b2e0d 100644 --- a/Source/cmAddLibraryCommand.cxx +++ b/Source/cmAddLibraryCommand.cxx @@ -178,21 +178,13 @@ bool cmAddLibraryCommand ++s; } - cmQtAutomoc* automoc = 0; - if ( doAutomoc ) - { - automoc = new cmQtAutomoc; - automoc->SetupAutomocTarget(this->Makefile, libName.c_str(), srclists); - } - cmTarget* tgt =this->Makefile->AddLibrary(libName.c_str(), type, srclists, excludeFromAll); - if ( automoc ) + if ( doAutomoc ) { - automoc->AddTargetDependency(this->Makefile, tgt); - delete automoc; - automoc = 0; + cmQtAutomoc automoc; + automoc.SetupAutomocTarget(tgt); } return true; |