summaryrefslogtreecommitdiffstats
path: root/Source/CPack/cmCPackProductBuildGenerator.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/CPack/cmCPackProductBuildGenerator.cxx')
-rw-r--r--Source/CPack/cmCPackProductBuildGenerator.cxx19
1 files changed, 10 insertions, 9 deletions
diff --git a/Source/CPack/cmCPackProductBuildGenerator.cxx b/Source/CPack/cmCPackProductBuildGenerator.cxx
index a3e55de..f55b8de 100644
--- a/Source/CPack/cmCPackProductBuildGenerator.cxx
+++ b/Source/CPack/cmCPackProductBuildGenerator.cxx
@@ -12,6 +12,7 @@
#include "cmGeneratedFileStream.h"
#include "cmStringAlgorithms.h"
#include "cmSystemTools.h"
+#include "cmValue.h"
cmCPackProductBuildGenerator::cmCPackProductBuildGenerator()
{
@@ -87,11 +88,11 @@ int cmCPackProductBuildGenerator::PackageFiles()
std::string version = this->GetOption("CPACK_PACKAGE_VERSION");
std::string productbuild = this->GetOption("CPACK_COMMAND_PRODUCTBUILD");
std::string identityName;
- if (const char* n = this->GetOption("CPACK_PRODUCTBUILD_IDENTITY_NAME")) {
+ if (cmValue n = this->GetOption("CPACK_PRODUCTBUILD_IDENTITY_NAME")) {
identityName = n;
}
std::string keychainPath;
- if (const char* p = this->GetOption("CPACK_PRODUCTBUILD_KEYCHAIN_PATH")) {
+ if (cmValue p = this->GetOption("CPACK_PRODUCTBUILD_KEYCHAIN_PATH")) {
keychainPath = p;
}
@@ -122,7 +123,7 @@ int cmCPackProductBuildGenerator::InitializeInternal()
"Cannot find pkgbuild executable" << std::endl);
return 0;
}
- this->SetOptionIfNotSet("CPACK_COMMAND_PKGBUILD", program.c_str());
+ this->SetOptionIfNotSet("CPACK_COMMAND_PKGBUILD", program);
program = cmSystemTools::FindProgram("productbuild", no_paths, false);
if (program.empty()) {
@@ -130,7 +131,7 @@ int cmCPackProductBuildGenerator::InitializeInternal()
"Cannot find productbuild executable" << std::endl);
return 0;
}
- this->SetOptionIfNotSet("CPACK_COMMAND_PRODUCTBUILD", program.c_str());
+ this->SetOptionIfNotSet("CPACK_COMMAND_PRODUCTBUILD", program);
return this->Superclass::InitializeInternal();
}
@@ -173,8 +174,8 @@ bool cmCPackProductBuildGenerator::GenerateComponentPackage(
const char* comp_name = component ? component->Name.c_str() : nullptr;
- const char* preflight = this->GetComponentScript("PREFLIGHT", comp_name);
- const char* postflight = this->GetComponentScript("POSTFLIGHT", comp_name);
+ cmValue preflight = this->GetComponentScript("PREFLIGHT", comp_name);
+ cmValue postflight = this->GetComponentScript("POSTFLIGHT", comp_name);
std::string resDir = packageFileDir;
if (component) {
@@ -213,11 +214,11 @@ bool cmCPackProductBuildGenerator::GenerateComponentPackage(
std::string version = this->GetOption("CPACK_PACKAGE_VERSION");
std::string pkgbuild = this->GetOption("CPACK_COMMAND_PKGBUILD");
std::string identityName;
- if (const char* n = this->GetOption("CPACK_PKGBUILD_IDENTITY_NAME")) {
+ if (cmValue n = this->GetOption("CPACK_PKGBUILD_IDENTITY_NAME")) {
identityName = n;
}
std::string keychainPath;
- if (const char* p = this->GetOption("CPACK_PKGBUILD_KEYCHAIN_PATH")) {
+ if (cmValue p = this->GetOption("CPACK_PKGBUILD_KEYCHAIN_PATH")) {
keychainPath = p;
}
@@ -239,7 +240,7 @@ bool cmCPackProductBuildGenerator::GenerateComponentPackage(
return RunProductBuild(pkgCmd.str());
}
-const char* cmCPackProductBuildGenerator::GetComponentScript(
+cmValue cmCPackProductBuildGenerator::GetComponentScript(
const char* script, const char* component_name)
{
std::string scriptname = std::string("CPACK_") + script + "_";