1 /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
2 file Copyright.txt or https://cmake.org/licensing for details. */
5 #include "cmConfigure.h" // IWYU pragma: keep
9 #include "cmCPackGenerator.h"
10 #include "cmCPackPKGGenerator.h"
13 class cmCPackComponent
;
15 /** \class cmCPackProductBuildGenerator
16 * \brief A generator for ProductBuild files
19 class cmCPackProductBuildGenerator
: public cmCPackPKGGenerator
22 cmCPackTypeMacro(cmCPackProductBuildGenerator
, cmCPackPKGGenerator
);
27 cmCPackProductBuildGenerator();
28 ~cmCPackProductBuildGenerator() override
;
31 int InitializeInternal() override
;
32 int PackageFiles() override
;
33 const char* GetOutputExtension() override
{ return ".pkg"; }
35 // Run ProductBuild with the given command line, which will (if
36 // successful) produce the given package file. Returns true if
37 // ProductBuild succeeds, false otherwise.
38 bool RunProductBuild(const std::string
& command
);
40 // Generate a package in the file packageFile for the given
41 // component. All of the files within this component are stored in
42 // the directory packageDir. Returns true if successful, false
44 bool GenerateComponentPackage(const std::string
& packageFileDir
,
45 const std::string
& packageFileName
,
46 const std::string
& packageDir
,
47 const cmCPackComponent
* component
);
49 cmValue
GetComponentScript(const char* script
, const char* script_component
);