diff options
author | Alex Neundorf <neundorf@kde.org> | 2011-08-15 23:27:30 (GMT) |
---|---|---|
committer | Alex Neundorf <neundorf@kde.org> | 2011-08-15 23:27:30 (GMT) |
commit | c27607baf860b6c57db84f21a298ad8257ff7153 (patch) | |
tree | 45a21e677e53e01c201a142f8c46777adf4f255f /Source/cmAddExecutableCommand.cxx | |
parent | 24d9b7d7452bfd9b3d7cea670a3a5a2e9f5b2f16 (diff) | |
download | CMake-c27607baf860b6c57db84f21a298ad8257ff7153.zip CMake-c27607baf860b6c57db84f21a298ad8257ff7153.tar.gz CMake-c27607baf860b6c57db84f21a298ad8257ff7153.tar.bz2 |
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/cmAddExecutableCommand.cxx')
-rw-r--r-- | Source/cmAddExecutableCommand.cxx | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/Source/cmAddExecutableCommand.cxx b/Source/cmAddExecutableCommand.cxx index 9710d20..ef75b3b 100644 --- a/Source/cmAddExecutableCommand.cxx +++ b/Source/cmAddExecutableCommand.cxx @@ -126,14 +126,6 @@ bool cmAddExecutableCommand } std::vector<std::string> srclists(s, args.end()); - cmQtAutomoc* automoc = 0; - if ( doAutomoc ) - { - automoc = new cmQtAutomoc; - automoc->SetupAutomocTarget(this->Makefile, exename.c_str(), srclists); - } - - cmTarget* tgt = this->Makefile->AddExecutable(exename.c_str(), srclists, excludeFromAll); if ( use_win32 ) @@ -145,11 +137,10 @@ bool cmAddExecutableCommand tgt->SetProperty("MACOSX_BUNDLE", "ON"); } - if ( automoc ) + if ( doAutomoc ) { - automoc->AddTargetDependency(this->Makefile, tgt); - delete automoc; - automoc = 0; + cmQtAutomoc automoc; + automoc.SetupAutomocTarget(tgt); } return true; |