Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Kitware
GitHub Repository: Kitware/CMake
Path: blob/master/Source/CPack/cmCPackProductBuildGenerator.h
5000 views
1
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
2
file LICENSE.rst or https://cmake.org/licensing for details. */
3
#pragma once
4
5
#include "cmConfigure.h" // IWYU pragma: keep
6
7
#include <string>
8
9
#include "cmCPackGenerator.h"
10
#include "cmCPackPKGGenerator.h"
11
#include "cmValue.h"
12
13
class cmCPackComponent;
14
15
/** \class cmCPackProductBuildGenerator
16
* \brief A generator for ProductBuild files
17
*
18
*/
19
class cmCPackProductBuildGenerator : public cmCPackPKGGenerator
20
{
21
public:
22
cmCPackTypeMacro(cmCPackProductBuildGenerator, cmCPackPKGGenerator);
23
24
/**
25
* Construct generator
26
*/
27
cmCPackProductBuildGenerator();
28
~cmCPackProductBuildGenerator() override;
29
30
protected:
31
int InitializeInternal() override;
32
int PackageFiles() override;
33
char const* GetOutputExtension() override { return ".pkg"; }
34
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(std::string const& command);
39
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
43
// otherwise.
44
bool GenerateComponentPackage(std::string const& packageFileDir,
45
std::string const& packageFileName,
46
std::string const& packageDir,
47
cmCPackComponent const* component);
48
49
cmValue GetComponentScript(char const* script, char const* script_component);
50
};
51
52