Przeglądaj źródła

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.
Alex Turbov 6 lat temu
rodzic
commit
98617f1be0

+ 0 - 0
Modules/CPack.DS_Store.in → Modules/Internal/CPack/CPack.DS_Store.in


+ 0 - 0
Modules/CPack.Description.plist.in → Modules/Internal/CPack/CPack.Description.plist.in


+ 0 - 0
Modules/CPack.Info.plist.in → Modules/Internal/CPack/CPack.Info.plist.in


+ 0 - 0
Modules/CPack.NuGet.nuspec.in → Modules/Internal/CPack/CPack.NuGet.nuspec.in


+ 0 - 0
Modules/CPack.OSXScriptLauncher.in → Modules/Internal/CPack/CPack.OSXScriptLauncher.in


+ 0 - 0
Modules/CPack.OSXScriptLauncher.rsrc.in → Modules/Internal/CPack/CPack.OSXScriptLauncher.rsrc.in


+ 0 - 0
Modules/CPack.OSXX11.Info.plist.in → Modules/Internal/CPack/CPack.OSXX11.Info.plist.in


+ 0 - 0
Modules/CPack.OSXX11.main.scpt.in → Modules/Internal/CPack/CPack.OSXX11.main.scpt.in


+ 0 - 0
Modules/CPack.RuntimeScript.in → Modules/Internal/CPack/CPack.RuntimeScript.in


+ 2 - 3
Modules/CPack.STGZ_Header.sh.in → Modules/Internal/CPack/CPack.STGZ_Header.sh.in

@@ -43,10 +43,10 @@ for a in "$@CPACK_AT_SIGN@"; do
     cpack_prefix_dir=`cpack_fix_slashes "${cpack_prefix_dir}"`
     cpack_prefix_dir=`cpack_fix_slashes "${cpack_prefix_dir}"`
   fi
   fi
   if echo $a | grep "^--help" > /dev/null 2> /dev/null; then
   if echo $a | grep "^--help" > /dev/null 2> /dev/null; then
-    cpack_usage 
+    cpack_usage
   fi
   fi
   if echo $a | grep "^--version" > /dev/null 2> /dev/null; then
   if echo $a | grep "^--version" > /dev/null 2> /dev/null; then
-    cpack_version 
+    cpack_version
     exit 2
     exit 2
   fi
   fi
   if echo $a | grep "^--include-subdir" > /dev/null 2> /dev/null; then
   if echo $a | grep "^--include-subdir" > /dev/null 2> /dev/null; then
@@ -143,4 +143,3 @@ exit 0
 #-----------------------------------------------------------
 #-----------------------------------------------------------
 #      Start of TAR.GZ file
 #      Start of TAR.GZ file
 #-----------------------------------------------------------;
 #-----------------------------------------------------------;
-

+ 0 - 0
Modules/CPack.VolumeIcon.icns.in → Modules/Internal/CPack/CPack.VolumeIcon.icns.in


+ 0 - 0
Modules/CPack.background.png.in → Modules/Internal/CPack/CPack.background.png.in


+ 0 - 0
Modules/CPack.distribution.dist.in → Modules/Internal/CPack/CPack.distribution.dist.in


+ 1 - 1
Modules/Internal/CPack/CPackNuGet.cmake

@@ -262,7 +262,7 @@ function(_cpack_nuget_render_spec)
     # NuGet will name it properly.
     # NuGet will name it properly.
     _cpack_nuget_debug("Rendering `${CPACK_TEMPORARY_DIRECTORY}/CPack.NuGet.nuspec` file...")
     _cpack_nuget_debug("Rendering `${CPACK_TEMPORARY_DIRECTORY}/CPack.NuGet.nuspec` file...")
     configure_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"
         "${CPACK_TEMPORARY_DIRECTORY}/CPack.NuGet.nuspec"
         @ONLY
         @ONLY
       )
       )

+ 0 - 0
Modules/NSIS.InstallOptions.ini.in → Modules/Internal/CPack/NSIS.InstallOptions.ini.in


+ 0 - 0
Modules/NSIS.template.in → Modules/Internal/CPack/NSIS.template.in


+ 0 - 0
Modules/WIX.template.in → Modules/Internal/CPack/WIX.template.in


+ 1 - 1
Source/CPack/WiX/cmCPackWIXGenerator.cxx

@@ -604,7 +604,7 @@ std::string cmCPackWIXGenerator::GetRootFolderId() const
 
 
 bool cmCPackWIXGenerator::GenerateMainSourceFileFromTemplate()
 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) {
   if (GetOption("CPACK_WIX_TEMPLATE") != 0) {
     wixTemplate = GetOption("CPACK_WIX_TEMPLATE");
     wixTemplate = GetOption("CPACK_WIX_TEMPLATE");
   }
   }

+ 3 - 2
Source/CPack/cmCPackNSISGenerator.cxx

@@ -36,7 +36,8 @@ int cmCPackNSISGenerator::PackageFiles()
 {
 {
   // TODO: Fix nsis to force out file name
   // 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()) {
   if (nsisInFileName.empty()) {
     cmCPackLogger(cmCPackLog::LOG_ERROR,
     cmCPackLogger(cmCPackLog::LOG_ERROR,
                   "CPack error: Could not find NSIS installer template file."
                   "CPack error: Could not find NSIS installer template file."
@@ -44,7 +45,7 @@ int cmCPackNSISGenerator::PackageFiles()
     return false;
     return false;
   }
   }
   std::string nsisInInstallOptions =
   std::string nsisInInstallOptions =
-    this->FindTemplate("NSIS.InstallOptions.ini.in");
+    this->FindTemplate("Internal/CPack/NSIS.InstallOptions.ini.in");
   if (nsisInInstallOptions.empty()) {
   if (nsisInInstallOptions.empty()) {
     cmCPackLogger(cmCPackLog::LOG_ERROR,
     cmCPackLogger(cmCPackLog::LOG_ERROR,
                   "CPack error: Could not find NSIS installer options file."
                   "CPack error: Could not find NSIS installer options file."

+ 1 - 1
Source/CPack/cmCPackOSXX11Generator.cxx

@@ -245,7 +245,7 @@ bool cmCPackOSXX11Generator::CopyResourcePlistFile(
   const std::string& name, const std::string& dir,
   const std::string& name, const std::string& dir,
   const char* outputFileName /* = 0 */, bool copyOnly /* = false */)
   const char* outputFileName /* = 0 */, bool copyOnly /* = false */)
 {
 {
-  std::string inFName = "CPack.";
+  std::string inFName = "Internal/CPack/CPack.";
   inFName += name;
   inFName += name;
   inFName += ".in";
   inFName += ".in";
   std::string inFileName = this->FindTemplate(inFName.c_str());
   std::string inFileName = this->FindTemplate(inFName.c_str());

+ 2 - 2
Source/CPack/cmCPackPKGGenerator.cxx

@@ -48,7 +48,7 @@ std::string cmCPackPKGGenerator::GetPackageName(
 void cmCPackPKGGenerator::WriteDistributionFile(const char* metapackageFile)
 void cmCPackPKGGenerator::WriteDistributionFile(const char* metapackageFile)
 {
 {
   std::string distributionTemplate =
   std::string distributionTemplate =
-    this->FindTemplate("CPack.distribution.dist.in");
+    this->FindTemplate("Internal/CPack/CPack.distribution.dist.in");
   if (distributionTemplate.empty()) {
   if (distributionTemplate.empty()) {
     cmCPackLogger(cmCPackLog::LOG_ERROR,
     cmCPackLogger(cmCPackLog::LOG_ERROR,
                   "Cannot find input file: " << distributionTemplate
                   "Cannot find input file: " << distributionTemplate
@@ -305,7 +305,7 @@ bool cmCPackPKGGenerator::CopyResourcePlistFile(const std::string& name,
     outName = name.c_str();
     outName = name.c_str();
   }
   }
 
 
-  std::string inFName = "CPack.";
+  std::string inFName = "Internal/CPack/CPack.";
   inFName += name;
   inFName += name;
   inFName += ".in";
   inFName += ".in";
   std::string inFileName = this->FindTemplate(inFName.c_str());
   std::string inFileName = this->FindTemplate(inFName.c_str());

+ 2 - 1
Source/CPack/cmCPackSTGZGenerator.cxx

@@ -21,7 +21,8 @@ int cmCPackSTGZGenerator::InitializeInternal()
 {
 {
   this->SetOptionIfNotSet("CPACK_INCLUDE_TOPLEVEL_DIRECTORY", "0");
   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()) {
   if (inFile.empty()) {
     cmCPackLogger(cmCPackLog::LOG_ERROR,
     cmCPackLogger(cmCPackLog::LOG_ERROR,
                   "Cannot find template file: " << inFile << std::endl);
                   "Cannot find template file: " << inFile << std::endl);