1 /*=========================================================================
3 Program: CMake - Cross-Platform Makefile Generator
4 Module: $RCSfile: cmInstallGenerator.h,v $
6 <<<<<<< cmInstallGenerator.h
7 Date: $Date: 2008/01/28 13:38:35 $
8 Version: $Revision: 1.13 $
10 Date: $Date: 2009-03-16 14:39:49 $
11 Version: $Revision: 1.14 $
14 Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
15 See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
17 This software is distributed WITHOUT ANY WARRANTY; without even
18 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
19 PURPOSE. See the above copyright notices for more information.
21 =========================================================================*/
22 #ifndef cmInstallGenerator_h
23 #define cmInstallGenerator_h
25 #include "cmScriptGenerator.h"
27 class cmLocalGenerator
;
29 /** \class cmInstallGenerator
30 * \brief Support class for generating install scripts.
33 class cmInstallGenerator
: public cmScriptGenerator
36 cmInstallGenerator(const char* destination
,
37 std::vector
<std::string
> const& configurations
,
38 const char* component
);
39 virtual ~cmInstallGenerator();
42 std::ostream
& os
, int type
,
43 std::vector
<std::string
> const& files
,
44 bool optional
= false,
45 const char* properties
= 0,
46 const char* permissions_file
= 0,
47 const char* permissions_dir
= 0,
48 const char* rename
= 0,
49 const char* literal_args
= 0,
50 Indent
const& indent
= Indent()
53 const char* GetDestination() const
54 { return this->Destination
.c_str(); }
56 /** Get the install destination as it should appear in the
57 installation script. */
58 std::string
GetInstallDestination() const;
60 /** Test if this generator installs something for a given configuration. */
61 bool InstallsForConfig(const char*);
64 virtual void GenerateScript(std::ostream
& os
);
66 std::string
CreateComponentTest(const char* component
);
68 // Information shared by most generator types.
69 std::string Destination
;
70 std::string Component
;