diff options
Diffstat (limited to 'Source/CPack/cmCPackProductBuildGenerator.cxx')
-rw-r--r-- | Source/CPack/cmCPackProductBuildGenerator.cxx | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/Source/CPack/cmCPackProductBuildGenerator.cxx b/Source/CPack/cmCPackProductBuildGenerator.cxx index 4ad616d..843219d 100644 --- a/Source/CPack/cmCPackProductBuildGenerator.cxx +++ b/Source/CPack/cmCPackProductBuildGenerator.cxx @@ -58,7 +58,7 @@ int cmCPackProductBuildGenerator::PackageFiles() } } - std::string resDir = packageDirFileName + "/Contents"; + std::string resDir = cmStrCat(packageDirFileName, "/Contents"); if (this->IsSet("CPACK_PRODUCTBUILD_RESOURCES_DIR")) { std::string userResDir = @@ -106,10 +106,14 @@ int cmCPackProductBuildGenerator::PackageFiles() << "\"" << " --resources \"" << resDir << "\"" << " --version \"" << version << "\"" - << (identifier.empty() ? "" : " --identifier \"" + identifier + "\"") - << (identityName.empty() ? "" : " --sign \"" + identityName + "\"") - << (keychainPath.empty() ? "" - : " --keychain \"" + keychainPath + "\"") + << (identifier.empty() + ? std::string{} + : cmStrCat(" --identifier \"", identifier, '"')) + << (identityName.empty() ? std::string{} + : cmStrCat(" --sign \"", identityName, '"')) + << (keychainPath.empty() + ? std::string{} + : cmStrCat(" --keychain \"", keychainPath, '"')) << " \"" << packageFileNames[0] << "\""; // Run ProductBuild @@ -187,7 +191,7 @@ bool cmCPackProductBuildGenerator::GenerateComponentPackage( resDir += "/"; resDir += component->Name; } - std::string scriptDir = resDir + "/scripts"; + std::string scriptDir = cmStrCat(resDir, "/scripts"); if (!cmsys::SystemTools::MakeDirectory(scriptDir.c_str())) { cmCPackLogger(cmCPackLog::LOG_ERROR, @@ -237,9 +241,11 @@ bool cmCPackProductBuildGenerator::GenerateComponentPackage( << " --scripts \"" << scriptDir << "\"" << " --version \"" << version << "\"" << " --install-location \"/\"" - << (identityName.empty() ? "" : " --sign \"" + identityName + "\"") - << (keychainPath.empty() ? "" - : " --keychain \"" + keychainPath + "\"") + << (identityName.empty() ? std::string{} + : cmStrCat(" --sign \"", identityName, "\"")) + << (keychainPath.empty() + ? std::string{} + : cmStrCat(" --keychain \"", keychainPath, "\"")) << " \"" << packageFile << "\""; if (component && !component->Plist.empty()) { @@ -253,7 +259,7 @@ bool cmCPackProductBuildGenerator::GenerateComponentPackage( cmValue cmCPackProductBuildGenerator::GetComponentScript( const char* script, const char* component_name) { - std::string scriptname = std::string("CPACK_") + script + "_"; + std::string scriptname = cmStrCat("CPACK_", script, "_"); if (component_name) { scriptname += cmSystemTools::UpperCase(component_name); scriptname += "_"; |