diff options
author | Alexander Neundorf <neundorf@kde.org> | 2007-05-18 17:43:39 (GMT) |
---|---|---|
committer | Alexander Neundorf <neundorf@kde.org> | 2007-05-18 17:43:39 (GMT) |
commit | df8f550029dc35ccbf39daf2733dbe2ca79e3d79 (patch) | |
tree | af68579b51e98d3ab6ad386ebabb11923b4cf0a9 /Source/cmGlobalGenerator.cxx | |
parent | a18d286635aed4feac32d64b589b528422e7eb6c (diff) | |
download | CMake-df8f550029dc35ccbf39daf2733dbe2ca79e3d79.zip CMake-df8f550029dc35ccbf39daf2733dbe2ca79e3d79.tar.gz CMake-df8f550029dc35ccbf39daf2733dbe2ca79e3d79.tar.bz2 |
ENH: add install/strip target for makefile generators if strip was found
Alex
Diffstat (limited to 'Source/cmGlobalGenerator.cxx')
-rw-r--r-- | Source/cmGlobalGenerator.cxx | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 6273f15..94cbf36 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -1440,16 +1440,35 @@ void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets) // install_local if(const char* install_local = this->GetInstallLocalTargetName()) { - singleLine.insert(singleLine.begin()+1, "-DCMAKE_INSTALL_LOCAL_ONLY=1"); + cmCustomCommandLine localCmdLine = singleLine; + + localCmdLine.insert(localCmdLine.begin()+1, "-DCMAKE_INSTALL_LOCAL_ONLY=1"); cpackCommandLines.erase(cpackCommandLines.begin(), cpackCommandLines.end()); - cpackCommandLines.push_back(singleLine); + cpackCommandLines.push_back(localCmdLine); (*targets)[install_local] = this->CreateGlobalTarget( install_local, "Installing only the local directory...", &cpackCommandLines, depends); } + + // install_strip + const char* install_strip = this->GetInstallStripTargetName(); + if((install_strip !=0) && (mf->IsSet("CMAKE_STRIP"))) + { + cmCustomCommandLine stripCmdLine = singleLine; + + stripCmdLine.insert(stripCmdLine.begin()+1,"-DCMAKE_INSTALL_DO_STRIP=1"); + cpackCommandLines.erase(cpackCommandLines.begin(), + cpackCommandLines.end()); + cpackCommandLines.push_back(stripCmdLine); + + (*targets)[install_strip] = + this->CreateGlobalTarget( + install_strip, "Installing the project stripped...", + &cpackCommandLines, depends); + } } } |