summaryrefslogtreecommitdiff
path: root/Source/cmInstallDirectoryGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2006-08-17 14:48:54 -0400
committerBrad King <brad.king@kitware.com>2006-08-17 14:48:54 -0400
commit8a72d43c176df44818154019248ad28d043f5dde (patch)
tree549347ba1e8ebb0fefec838132eff5fd98d74965 /Source/cmInstallDirectoryGenerator.cxx
parentb642ffa7a82922d99475fa38e9a7f317e029ebf3 (diff)
downloadcmake-8a72d43c176df44818154019248ad28d043f5dde.tar.gz
ENH: Started implementing INSTALL(DIRECTORY) command mode. This is not yet finished so it is undocumented and there is no test. These changes also separate the notions of file and directory permissions.
Diffstat (limited to 'Source/cmInstallDirectoryGenerator.cxx')
-rw-r--r--Source/cmInstallDirectoryGenerator.cxx59
1 files changed, 59 insertions, 0 deletions
diff --git a/Source/cmInstallDirectoryGenerator.cxx b/Source/cmInstallDirectoryGenerator.cxx
new file mode 100644
index 0000000000..9ff09a6f82
--- /dev/null
+++ b/Source/cmInstallDirectoryGenerator.cxx
@@ -0,0 +1,59 @@
+/*=========================================================================
+
+ Program: CMake - Cross-Platform Makefile Generator
+ Module: $RCSfile$
+ Language: C++
+ Date: $Date$
+ Version: $Revision$
+
+ Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
+ See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
+
+ This software is distributed WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE. See the above copyright notices for more information.
+
+=========================================================================*/
+#include "cmInstallDirectoryGenerator.h"
+
+#include "cmTarget.h"
+
+//----------------------------------------------------------------------------
+cmInstallDirectoryGenerator
+::cmInstallDirectoryGenerator(std::vector<std::string> const& dirs,
+ const char* dest,
+ const char* file_permissions,
+ const char* dir_permissions,
+ std::vector<std::string> const& configurations,
+ const char* component):
+ Directories(dirs), Destination(dest),
+ FilePermissions(file_permissions), DirPermissions(dir_permissions),
+ Configurations(configurations), Component(component)
+{
+}
+
+//----------------------------------------------------------------------------
+cmInstallDirectoryGenerator
+::~cmInstallDirectoryGenerator()
+{
+}
+
+//----------------------------------------------------------------------------
+void cmInstallDirectoryGenerator::GenerateScript(std::ostream& os)
+{
+ // Write code to install the directories.
+ for(std::vector<std::string>::const_iterator di = this->Directories.begin();
+ di != this->Directories.end(); ++di)
+ {
+ bool not_optional = false;
+ const char* no_properties = 0;
+ const char* no_rename = 0;
+ this->AddInstallRule(os, this->Destination.c_str(),
+ cmTarget::INSTALL_DIRECTORY, di->c_str(),
+ not_optional, no_properties,
+ this->FilePermissions.c_str(),
+ this->DirPermissions.c_str(),
+ this->Configurations, this->Component.c_str(),
+ no_rename);
+ }
+}