Factor cmInstallType out of cmTarget::TargetType

The purpose of the TargetType enumeration was overloaded for install
type because install rules were once recorded as targets.  Factor the
install types out into their own enumeration.
This commit is contained in:
Brad King
2012-02-27 11:26:38 -05:00
parent cffebe643c
commit 573fa3bf13
13 changed files with 81 additions and 70 deletions

View File

@@ -12,7 +12,6 @@
#include "cmInstallGenerator.h"
#include "cmSystemTools.h"
#include "cmTarget.h"
//----------------------------------------------------------------------------
cmInstallGenerator
@@ -35,7 +34,7 @@ cmInstallGenerator
void cmInstallGenerator
::AddInstallRule(
std::ostream& os,
int type,
cmInstallType type,
std::vector<std::string> const& files,
bool optional /* = false */,
const char* permissions_file /* = 0 */,
@@ -49,14 +48,13 @@ void cmInstallGenerator
std::string stype;
switch(type)
{
case cmTarget::INSTALL_DIRECTORY:stype = "DIRECTORY"; break;
case cmTarget::INSTALL_PROGRAMS: stype = "PROGRAM"; break;
case cmTarget::EXECUTABLE: stype = "EXECUTABLE"; break;
case cmTarget::STATIC_LIBRARY: stype = "STATIC_LIBRARY"; break;
case cmTarget::SHARED_LIBRARY: stype = "SHARED_LIBRARY"; break;
case cmTarget::MODULE_LIBRARY: stype = "MODULE"; break;
case cmTarget::INSTALL_FILES:
default: stype = "FILE"; break;
case cmInstallType_DIRECTORY: stype = "DIRECTORY"; break;
case cmInstallType_PROGRAMS: stype = "PROGRAM"; break;
case cmInstallType_EXECUTABLE: stype = "EXECUTABLE"; break;
case cmInstallType_STATIC_LIBRARY: stype = "STATIC_LIBRARY"; break;
case cmInstallType_SHARED_LIBRARY: stype = "SHARED_LIBRARY"; break;
case cmInstallType_MODULE_LIBRARY: stype = "MODULE"; break;
case cmInstallType_FILES: stype = "FILE"; break;
}
os << indent;
std::string dest = this->GetInstallDestination();