stringapi: Pass strings as install directories in CPack
This commit is contained in:
parent
3def29da3c
commit
2b17626e9b
|
@ -254,7 +254,7 @@ int cmCPackGenerator::InstallProject()
|
||||||
// If the project is a CMAKE project then run pre-install
|
// If the project is a CMAKE project then run pre-install
|
||||||
// and then read the cmake_install script to run it
|
// and then read the cmake_install script to run it
|
||||||
if ( !this->InstallProjectViaInstallCMakeProjects(
|
if ( !this->InstallProjectViaInstallCMakeProjects(
|
||||||
setDestDir, bareTempInstallDirectory.c_str()) )
|
setDestDir, bareTempInstallDirectory) )
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -269,7 +269,7 @@ int cmCPackGenerator::InstallProject()
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
int cmCPackGenerator::InstallProjectViaInstallCommands(
|
int cmCPackGenerator::InstallProjectViaInstallCommands(
|
||||||
bool setDestDir, const char* tempInstallDirectory)
|
bool setDestDir, const std::string& tempInstallDirectory)
|
||||||
{
|
{
|
||||||
(void) setDestDir;
|
(void) setDestDir;
|
||||||
const char* installCommands = this->GetOption("CPACK_INSTALL_COMMANDS");
|
const char* installCommands = this->GetOption("CPACK_INSTALL_COMMANDS");
|
||||||
|
@ -312,7 +312,7 @@ int cmCPackGenerator::InstallProjectViaInstallCommands(
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
int cmCPackGenerator::InstallProjectViaInstalledDirectories(
|
int cmCPackGenerator::InstallProjectViaInstalledDirectories(
|
||||||
bool setDestDir, const char* tempInstallDirectory)
|
bool setDestDir, const std::string& tempInstallDirectory)
|
||||||
{
|
{
|
||||||
(void)setDestDir;
|
(void)setDestDir;
|
||||||
(void)tempInstallDirectory;
|
(void)tempInstallDirectory;
|
||||||
|
@ -349,7 +349,7 @@ int cmCPackGenerator::InstallProjectViaInstalledDirectories(
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
std::vector<std::string>::iterator it;
|
std::vector<std::string>::iterator it;
|
||||||
const char* tempDir = tempInstallDirectory;
|
const std::string& tempDir = tempInstallDirectory;
|
||||||
for ( it = installDirectoriesVector.begin();
|
for ( it = installDirectoriesVector.begin();
|
||||||
it != installDirectoriesVector.end();
|
it != installDirectoriesVector.end();
|
||||||
++it )
|
++it )
|
||||||
|
@ -457,7 +457,7 @@ int cmCPackGenerator::InstallProjectViaInstalledDirectories(
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
int cmCPackGenerator::InstallProjectViaInstallScript(
|
int cmCPackGenerator::InstallProjectViaInstallScript(
|
||||||
bool setDestDir, const char* tempInstallDirectory)
|
bool setDestDir, const std::string& tempInstallDirectory)
|
||||||
{
|
{
|
||||||
const char* cmakeScripts
|
const char* cmakeScripts
|
||||||
= this->GetOption("CPACK_INSTALL_SCRIPT");
|
= this->GetOption("CPACK_INSTALL_SCRIPT");
|
||||||
|
@ -499,7 +499,7 @@ int cmCPackGenerator::InstallProjectViaInstallScript(
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
this->SetOption("CMAKE_INSTALL_PREFIX", tempInstallDirectory);
|
this->SetOption("CMAKE_INSTALL_PREFIX", tempInstallDirectory.c_str());
|
||||||
|
|
||||||
cmCPackLogger(cmCPackLog::LOG_DEBUG,
|
cmCPackLogger(cmCPackLog::LOG_DEBUG,
|
||||||
"- Using non-DESTDIR install... (this->SetOption)" << std::endl);
|
"- Using non-DESTDIR install... (this->SetOption)" << std::endl);
|
||||||
|
@ -509,9 +509,9 @@ int cmCPackGenerator::InstallProjectViaInstallScript(
|
||||||
}
|
}
|
||||||
|
|
||||||
this->SetOptionIfNotSet("CMAKE_CURRENT_BINARY_DIR",
|
this->SetOptionIfNotSet("CMAKE_CURRENT_BINARY_DIR",
|
||||||
tempInstallDirectory);
|
tempInstallDirectory.c_str());
|
||||||
this->SetOptionIfNotSet("CMAKE_CURRENT_SOURCE_DIR",
|
this->SetOptionIfNotSet("CMAKE_CURRENT_SOURCE_DIR",
|
||||||
tempInstallDirectory);
|
tempInstallDirectory.c_str());
|
||||||
int res = this->MakefileMap->ReadListFile(0, installScript.c_str());
|
int res = this->MakefileMap->ReadListFile(0, installScript.c_str());
|
||||||
if ( cmSystemTools::GetErrorOccuredFlag() || !res )
|
if ( cmSystemTools::GetErrorOccuredFlag() || !res )
|
||||||
{
|
{
|
||||||
|
@ -524,7 +524,7 @@ int cmCPackGenerator::InstallProjectViaInstallScript(
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
int cmCPackGenerator::InstallProjectViaInstallCMakeProjects(
|
int cmCPackGenerator::InstallProjectViaInstallCMakeProjects(
|
||||||
bool setDestDir, const char* baseTempInstallDirectory)
|
bool setDestDir, const std::string& baseTempInstallDirectory)
|
||||||
{
|
{
|
||||||
const char* cmakeProjects
|
const char* cmakeProjects
|
||||||
= this->GetOption("CPACK_INSTALL_CMAKE_PROJECTS");
|
= this->GetOption("CPACK_INSTALL_CMAKE_PROJECTS");
|
||||||
|
|
|
@ -190,13 +190,13 @@ protected:
|
||||||
|
|
||||||
//! Run install commands if specified
|
//! Run install commands if specified
|
||||||
virtual int InstallProjectViaInstallCommands(
|
virtual int InstallProjectViaInstallCommands(
|
||||||
bool setDestDir, const char* tempInstallDirectory);
|
bool setDestDir, const std::string& tempInstallDirectory);
|
||||||
virtual int InstallProjectViaInstallScript(
|
virtual int InstallProjectViaInstallScript(
|
||||||
bool setDestDir, const char* tempInstallDirectory);
|
bool setDestDir, const std::string& tempInstallDirectory);
|
||||||
virtual int InstallProjectViaInstalledDirectories(
|
virtual int InstallProjectViaInstalledDirectories(
|
||||||
bool setDestDir, const char* tempInstallDirectory);
|
bool setDestDir, const std::string& tempInstallDirectory);
|
||||||
virtual int InstallProjectViaInstallCMakeProjects(
|
virtual int InstallProjectViaInstallCMakeProjects(
|
||||||
bool setDestDir, const char* tempInstallDirectory);
|
bool setDestDir, const std::string& tempInstallDirectory);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The various level of support of
|
* The various level of support of
|
||||||
|
|
Loading…
Reference in New Issue