1 /*=========================================================================
3 Program: CMake - Cross-Platform Makefile Generator
4 Module: $RCSfile: cmInstallTargetGenerator.h,v $
6 Date: $Date: 2009-03-16 14:39:50 $
7 Version: $Revision: 1.29 $
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 #ifndef cmInstallTargetGenerator_h
18 #define cmInstallTargetGenerator_h
20 #include "cmInstallGenerator.h"
23 /** \class cmInstallTargetGenerator
24 * \brief Generate target installation rules.
26 class cmInstallTargetGenerator
: public cmInstallGenerator
29 cmInstallTargetGenerator(
30 cmTarget
& t
, const char* dest
, bool implib
,
31 const char* file_permissions
= "",
32 std::vector
<std::string
> const& configurations
33 = std::vector
<std::string
>(),
34 const char* component
= "Unspecified",
37 virtual ~cmInstallTargetGenerator();
39 /** Select the policy for installing shared library linkable name
47 void SetNamelinkMode(NamelinkModeType mode
) { this->NamelinkMode
= mode
; }
48 NamelinkModeType
GetNamelinkMode() const { return this->NamelinkMode
; }
50 std::string
GetInstallFilename(const char* config
) const;
60 static std::string
GetInstallFilename(cmTarget
*target
, const char* config
,
61 NameType nameType
= NameNormal
);
63 cmTarget
* GetTarget() const { return this->Target
; }
64 bool IsImportLibrary() const { return this->ImportLibrary
; }
67 virtual void GenerateScript(std::ostream
& os
);
68 virtual void GenerateScriptForConfig(std::ostream
& os
,
70 Indent
const& indent
);
71 void AddInstallNamePatchRule(std::ostream
& os
, Indent
const& indent
,
73 const std::string
& toDestDirPath
);
74 void AddChrpathPatchRule(std::ostream
& os
, Indent
const& indent
,
76 std::string
const& toDestDirPath
);
77 void AddRPathCheckRule(std::ostream
& os
, Indent
const& indent
,
79 std::string
const& toDestDirPath
);
81 void AddStripRule(std::ostream
& os
, Indent
const& indent
,
82 cmTarget::TargetType type
,
83 const std::string
& toDestDirPath
);
84 void AddRanlibRule(std::ostream
& os
, Indent
const& indent
,
85 cmTarget::TargetType type
,
86 const std::string
& toDestDirPath
);
90 std::string FilePermissions
;
92 NamelinkModeType NamelinkMode
;