ENH: Further cleanup of installation script generation. The per-component and per...
[cmake.git] / Source / cmInstallDirectoryGenerator.cxx
blob26f7fb18b56641da4ae4a7c3a17ec3dc318b2075
1 /*=========================================================================
3 Program: CMake - Cross-Platform Makefile Generator
4 Module: $RCSfile: cmInstallDirectoryGenerator.cxx,v $
5 Language: C++
6 Date: $Date: 2007-07-02 18:56:57 $
7 Version: $Revision: 1.5 $
9 Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
10 See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
12 This software is distributed WITHOUT ANY WARRANTY; without even
13 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14 PURPOSE. See the above copyright notices for more information.
16 =========================================================================*/
17 #include "cmInstallDirectoryGenerator.h"
19 #include "cmTarget.h"
21 //----------------------------------------------------------------------------
22 cmInstallDirectoryGenerator
23 ::cmInstallDirectoryGenerator(std::vector<std::string> const& dirs,
24 const char* dest,
25 const char* file_permissions,
26 const char* dir_permissions,
27 std::vector<std::string> const& configurations,
28 const char* component,
29 const char* literal_args):
30 cmInstallGenerator(dest, configurations, component), Directories(dirs),
31 FilePermissions(file_permissions), DirPermissions(dir_permissions),
32 LiteralArguments(literal_args)
36 //----------------------------------------------------------------------------
37 cmInstallDirectoryGenerator
38 ::~cmInstallDirectoryGenerator()
42 //----------------------------------------------------------------------------
43 void
44 cmInstallDirectoryGenerator::GenerateScriptActions(std::ostream& os,
45 Indent const& indent)
47 // Write code to install the directories.
48 bool not_optional = false;
49 const char* no_properties = 0;
50 const char* no_rename = 0;
51 this->AddInstallRule(os, this->Destination.c_str(),
52 cmTarget::INSTALL_DIRECTORY,
53 this->Directories,
54 not_optional, no_properties,
55 this->FilePermissions.c_str(),
56 this->DirPermissions.c_str(),
57 no_rename, this->LiteralArguments.c_str(),
58 indent);