Resync
[CMakeLuaTailorHgBridge.git] / CMakeLua / Source / cmInstallGenerator.h
blob299f5efb3a852102b75563d887bac80ecf06c338
1 /*=========================================================================
3 Program: CMake - Cross-Platform Makefile Generator
4 Module: $RCSfile: cmInstallGenerator.h,v $
5 Language: C++
6 <<<<<<< cmInstallGenerator.h
7 Date: $Date: 2008/01/28 13:38:35 $
8 Version: $Revision: 1.13 $
9 =======
10 Date: $Date: 2009-03-16 14:39:49 $
11 Version: $Revision: 1.14 $
12 >>>>>>> 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
35 public:
36 cmInstallGenerator(const char* destination,
37 std::vector<std::string> const& configurations,
38 const char* component);
39 virtual ~cmInstallGenerator();
41 void AddInstallRule(
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*);
63 protected:
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;
73 #endif