Commit 98617f1b authored by Alex Turbov's avatar Alex Turbov

Refactor: Move CPack internal files to `Internal/CPack/` directory

Some commits ago all CPack internal `*.cmake` files have been moved
to `Internal/CPack/`. This commit also move some templates
internally used by generators to the same location to make
`Modules/` directory less noisy w/ files the end users don't
need to use/see.
parent e559a3e9
......@@ -143,4 +143,3 @@ exit 0
#-----------------------------------------------------------
# Start of TAR.GZ file
#-----------------------------------------------------------;
......@@ -262,7 +262,7 @@ function(_cpack_nuget_render_spec)
# NuGet will name it properly.
_cpack_nuget_debug("Rendering `${CPACK_TEMPORARY_DIRECTORY}/CPack.NuGet.nuspec` file...")
configure_file(
"${CMAKE_ROOT}/Modules/CPack.NuGet.nuspec.in"
"${CMAKE_ROOT}/Modules/Internal/CPack/CPack.NuGet.nuspec.in"
"${CPACK_TEMPORARY_DIRECTORY}/CPack.NuGet.nuspec"
@ONLY
)
......
......@@ -604,7 +604,7 @@ std::string cmCPackWIXGenerator::GetRootFolderId() const
bool cmCPackWIXGenerator::GenerateMainSourceFileFromTemplate()
{
std::string wixTemplate = FindTemplate("WIX.template.in");
std::string wixTemplate = FindTemplate("Internal/CPack/WIX.template.in");
if (GetOption("CPACK_WIX_TEMPLATE") != 0) {
wixTemplate = GetOption("CPACK_WIX_TEMPLATE");
}
......
......@@ -36,7 +36,8 @@ int cmCPackNSISGenerator::PackageFiles()
{
// TODO: Fix nsis to force out file name
std::string nsisInFileName = this->FindTemplate("NSIS.template.in");
std::string nsisInFileName =
this->FindTemplate("Internal/CPack/NSIS.template.in");
if (nsisInFileName.empty()) {
cmCPackLogger(cmCPackLog::LOG_ERROR,
"CPack error: Could not find NSIS installer template file."
......@@ -44,7 +45,7 @@ int cmCPackNSISGenerator::PackageFiles()
return false;
}
std::string nsisInInstallOptions =
this->FindTemplate("NSIS.InstallOptions.ini.in");
this->FindTemplate("Internal/CPack/NSIS.InstallOptions.ini.in");
if (nsisInInstallOptions.empty()) {
cmCPackLogger(cmCPackLog::LOG_ERROR,
"CPack error: Could not find NSIS installer options file."
......
......@@ -245,7 +245,7 @@ bool cmCPackOSXX11Generator::CopyResourcePlistFile(
const std::string& name, const std::string& dir,
const char* outputFileName /* = 0 */, bool copyOnly /* = false */)
{
std::string inFName = "CPack.";
std::string inFName = "Internal/CPack/CPack.";
inFName += name;
inFName += ".in";
std::string inFileName = this->FindTemplate(inFName.c_str());
......
......@@ -48,7 +48,7 @@ std::string cmCPackPKGGenerator::GetPackageName(
void cmCPackPKGGenerator::WriteDistributionFile(const char* metapackageFile)
{
std::string distributionTemplate =
this->FindTemplate("CPack.distribution.dist.in");
this->FindTemplate("Internal/CPack/CPack.distribution.dist.in");
if (distributionTemplate.empty()) {
cmCPackLogger(cmCPackLog::LOG_ERROR,
"Cannot find input file: " << distributionTemplate
......@@ -305,7 +305,7 @@ bool cmCPackPKGGenerator::CopyResourcePlistFile(const std::string& name,
outName = name.c_str();
}
std::string inFName = "CPack.";
std::string inFName = "Internal/CPack/CPack.";
inFName += name;
inFName += ".in";
std::string inFileName = this->FindTemplate(inFName.c_str());
......
......@@ -21,7 +21,8 @@ int cmCPackSTGZGenerator::InitializeInternal()
{
this->SetOptionIfNotSet("CPACK_INCLUDE_TOPLEVEL_DIRECTORY", "0");
std::string inFile = this->FindTemplate("CPack.STGZ_Header.sh.in");
std::string inFile =
this->FindTemplate("Internal/CPack/CPack.STGZ_Header.sh.in");
if (inFile.empty()) {
cmCPackLogger(cmCPackLog::LOG_ERROR,
"Cannot find template file: " << inFile << std::endl);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment