mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-15 03:48:02 +08:00
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.
This commit is contained in:
0
Modules/CPack.OSXScriptLauncher.in → Modules/Internal/CPack/CPack.OSXScriptLauncher.in
Executable file → Normal file
0
Modules/CPack.OSXScriptLauncher.in → Modules/Internal/CPack/CPack.OSXScriptLauncher.in
Executable file → Normal file
Before Width: | Height: | Size: 362 B After Width: | Height: | Size: 362 B |
@@ -43,10 +43,10 @@ for a in "$@CPACK_AT_SIGN@"; do
|
||||
cpack_prefix_dir=`cpack_fix_slashes "${cpack_prefix_dir}"`
|
||||
fi
|
||||
if echo $a | grep "^--help" > /dev/null 2> /dev/null; then
|
||||
cpack_usage
|
||||
cpack_usage
|
||||
fi
|
||||
if echo $a | grep "^--version" > /dev/null 2> /dev/null; then
|
||||
cpack_version
|
||||
cpack_version
|
||||
exit 2
|
||||
fi
|
||||
if echo $a | grep "^--include-subdir" > /dev/null 2> /dev/null; then
|
||||
@@ -143,4 +143,3 @@ exit 0
|
||||
#-----------------------------------------------------------
|
||||
# Start of TAR.GZ file
|
||||
#-----------------------------------------------------------;
|
||||
|
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 43 KiB |
@@ -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);
|
||||
|
Reference in New Issue
Block a user