diff options
author | Alex Neundorf <neundorf@kde.org> | 2011-08-16 01:27:30 +0200 |
---|---|---|
committer | Alex Neundorf <neundorf@kde.org> | 2011-08-16 01:27:30 +0200 |
commit | c27607baf860b6c57db84f21a298ad8257ff7153 (patch) | |
tree | 45a21e677e53e01c201a142f8c46777adf4f255f /Source/cmAddLibraryCommand.cxx | |
parent | 24d9b7d7452bfd9b3d7cea670a3a5a2e9f5b2f16 (diff) | |
download | cmake-c27607baf860b6c57db84f21a298ad8257ff7153.tar.gz |
Refactor SetupAutomocTarget() so it can be run after creating the target
This makes it easier to move it from InitialPass() to some other
location, e.g. FinalPass() or something else.
Alex
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 a581ea14a3..f0b2e0d43a 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; |