diff options
author | Brad King <brad.king@kitware.com> | 2006-08-29 14:03:47 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2006-08-29 14:03:47 (GMT) |
commit | eef327b944a590373faa8df4eca7dbf0387c6f5c (patch) | |
tree | 736c79794fbc57142854c6855bcb6da92b4bd281 /Source/cmGlobalGenerator.cxx | |
parent | 8a761b8f96942fe586bb932fbe840a4679a35705 (diff) | |
download | CMake-eef327b944a590373faa8df4eca7dbf0387c6f5c.zip CMake-eef327b944a590373faa8df4eca7dbf0387c6f5c.tar.gz CMake-eef327b944a590373faa8df4eca7dbf0387c6f5c.tar.bz2 |
ENH: Adding install/local global target for Makefile generators. This runs installation only in the current directory and not subdirectories.
Diffstat (limited to 'Source/cmGlobalGenerator.cxx')
-rw-r--r-- | Source/cmGlobalGenerator.cxx | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 0f4d13e..35bc3b7 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -1495,6 +1495,20 @@ void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets) this->CreateGlobalTarget( this->GetInstallTargetName(), "Install the project...", &cpackCommandLines, depends); + + // install_local + if(const char* install_local = this->GetInstallLocalTargetName()) + { + singleLine.insert(singleLine.begin()+1, "-DCMAKE_INSTALL_LOCAL_ONLY=1"); + cpackCommandLines.erase(cpackCommandLines.begin(), + cpackCommandLines.end()); + cpackCommandLines.push_back(singleLine); + + (*targets)[install_local] = + this->CreateGlobalTarget( + install_local, "Installing only the local directory...", + &cpackCommandLines, depends); + } } cmTarget cmGlobalGenerator::CreateGlobalTarget( |