diff options
Diffstat (limited to 'Source/CPack/cmCPackBundleGenerator.cxx')
-rw-r--r-- | Source/CPack/cmCPackBundleGenerator.cxx | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/Source/CPack/cmCPackBundleGenerator.cxx b/Source/CPack/cmCPackBundleGenerator.cxx index 3a476f44b9..4d5f43f9eb 100644 --- a/Source/CPack/cmCPackBundleGenerator.cxx +++ b/Source/CPack/cmCPackBundleGenerator.cxx @@ -6,6 +6,7 @@ #include <vector> #include "cmCPackLog.h" +#include "cmStringAlgorithms.h" #include "cmSystemTools.h" cmCPackBundleGenerator::cmCPackBundleGenerator() = default; @@ -40,9 +41,8 @@ int cmCPackBundleGenerator::InitializeInternal() const char* cmCPackBundleGenerator::GetPackagingInstallPrefix() { - this->InstallPrefix = "/"; - this->InstallPrefix += this->GetOption("CPACK_BUNDLE_NAME"); - this->InstallPrefix += ".app/Contents/Resources"; + this->InstallPrefix = cmStrCat('/', this->GetOption("CPACK_BUNDLE_NAME"), + ".app/Contents/Resources"); return this->InstallPrefix.c_str(); } @@ -89,11 +89,10 @@ int cmCPackBundleGenerator::ConstructBundle() // The staging directory contains everything that will end-up inside the // final disk image ... - std::ostringstream staging; - staging << toplevel; + std::string const staging = toplevel; std::ostringstream contents; - contents << staging.str() << "/" << cpack_bundle_name << ".app/" + contents << staging << "/" << cpack_bundle_name << ".app/" << "Contents"; std::ostringstream application; @@ -190,9 +189,8 @@ int cmCPackBundleGenerator::SignBundle(const std::string& src_dir) if (!cpack_apple_cert_app.empty()) { std::string output; std::string bundle_path; - bundle_path = src_dir + "/"; - bundle_path += this->GetOption("CPACK_BUNDLE_NAME"); - bundle_path += ".app"; + bundle_path = + cmStrCat(src_dir, '/', this->GetOption("CPACK_BUNDLE_NAME"), ".app"); // A list of additional files to sign, ie. frameworks and plugins. const std::string sign_parameter = @@ -205,8 +203,7 @@ int cmCPackBundleGenerator::SignBundle(const std::string& src_dir) ? this->GetOption("CPACK_BUNDLE_APPLE_CODESIGN_FILES") : ""; - std::vector<std::string> relFiles; - cmSystemTools::ExpandListArgument(sign_files, relFiles); + std::vector<std::string> relFiles = cmExpandedList(sign_files); // sign the files supplied by the user, ie. frameworks. for (auto const& file : relFiles) { |