1 /*============================================================================
2 CMake - Cross Platform Makefile Generator
3 Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
5 Distributed under the OSI-approved BSD License (the "License");
6 see accompanying file Copyright.txt for details.
8 This software is distributed WITHOUT ANY WARRANTY; without even the
9 implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10 See the License for more information.
11 ============================================================================*/
12 #ifndef cmInstallGenerator_h
13 #define cmInstallGenerator_h
15 #include "cmInstallType.h"
16 #include "cmScriptGenerator.h"
18 class cmLocalGenerator;
20 /** \class cmInstallGenerator
21 * \brief Support class for generating install scripts.
24 class cmInstallGenerator: public cmScriptGenerator
27 cmInstallGenerator(const char* destination,
28 std::vector<std::string> const& configurations,
29 const char* component);
30 virtual ~cmInstallGenerator();
33 std::ostream& os, cmInstallType type,
34 std::vector<std::string> const& files,
35 bool optional = false,
36 const char* permissions_file = 0,
37 const char* permissions_dir = 0,
38 const char* rename = 0,
39 const char* literal_args = 0,
40 Indent const& indent = Indent()
43 const char* GetDestination() const
44 { return this->Destination.c_str(); }
46 /** Get the install destination as it should appear in the
47 installation script. */
48 std::string GetInstallDestination() const;
50 /** Test if this generator installs something for a given configuration. */
51 bool InstallsForConfig(const char*);
54 virtual void GenerateScript(std::ostream& os);
56 std::string CreateComponentTest(const char* component);
58 // Information shared by most generator types.
59 std::string Destination;
60 std::string Component;