BUG: Fix for generated install scripts to support prefixes with trailing slashes or just a single slash.
This commit is contained in:
parent
a2bfdf9542
commit
2b7e43961c
|
@ -307,10 +307,11 @@ void cmLocalGenerator::GenerateInstallRules()
|
|||
// Write the header.
|
||||
fout << "# Install script for directory: "
|
||||
<< m_Makefile->GetCurrentDirectory() << std::endl << std::endl;
|
||||
fout << "# Set the install prefix" << std::endl
|
||||
<< "IF(NOT CMAKE_INSTALL_PREFIX)" << std::endl
|
||||
fout << "# Set the install prefix and remove any trailing slash." << std::endl
|
||||
<< "IF(NOT DEFINED CMAKE_INSTALL_PREFIX)" << std::endl
|
||||
<< " SET(CMAKE_INSTALL_PREFIX \"" << prefix << "\")" << std::endl
|
||||
<< "ENDIF(NOT CMAKE_INSTALL_PREFIX)" << std::endl
|
||||
<< "ENDIF(NOT DEFINED CMAKE_INSTALL_PREFIX)" << std::endl
|
||||
<< "STRING(REGEX REPLACE \"/$\" \"\" CMAKE_INSTALL_PREFIX \"${CMAKE_INSTALL_PREFIX}\")" << std::endl
|
||||
<< std::endl;
|
||||
|
||||
// Write support code for generating per-configuration install rules.
|
||||
|
|
Loading…
Reference in New Issue