2016-10-30 18:24:19 +01:00
|
|
|
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
|
|
|
file Copyright.txt or https://cmake.org/licensing for details. */
|
2021-09-14 00:13:48 +02:00
|
|
|
#pragma once
|
2008-10-12 18:41:06 +02:00
|
|
|
|
2018-01-26 17:06:56 +01:00
|
|
|
#include "cmConfigure.h" // IWYU pragma: keep
|
2016-10-30 18:24:19 +01:00
|
|
|
|
|
|
|
#include <iosfwd>
|
2020-08-30 11:54:41 +02:00
|
|
|
#include <memory>
|
2016-10-30 18:24:19 +01:00
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
2008-10-12 18:41:06 +02:00
|
|
|
|
2020-02-01 23:06:01 +01:00
|
|
|
#include "cmInstallGenerator.h"
|
|
|
|
#include "cmScriptGenerator.h"
|
|
|
|
|
2008-10-12 18:41:06 +02:00
|
|
|
class cmExportInstallFileGenerator;
|
2013-03-16 19:13:01 +02:00
|
|
|
class cmExportSet;
|
2022-08-04 22:12:04 +02:00
|
|
|
class cmListFileBacktrace;
|
2016-10-30 18:24:19 +01:00
|
|
|
class cmLocalGenerator;
|
2008-10-12 18:41:06 +02:00
|
|
|
|
|
|
|
/** \class cmInstallExportGenerator
|
|
|
|
* \brief Generate rules for creating an export files.
|
|
|
|
*/
|
2016-07-09 11:21:54 +02:00
|
|
|
class cmInstallExportGenerator : public cmInstallGenerator
|
2008-10-12 18:41:06 +02:00
|
|
|
{
|
|
|
|
public:
|
2020-08-30 11:54:41 +02:00
|
|
|
cmInstallExportGenerator(cmExportSet* exportSet, std::string const& dest,
|
|
|
|
std::string file_permissions,
|
2008-10-12 18:41:06 +02:00
|
|
|
const std::vector<std::string>& configurations,
|
2020-08-30 11:54:41 +02:00
|
|
|
std::string const& component, MessageLevel message,
|
|
|
|
bool exclude_from_all, std::string filename,
|
2022-11-16 20:14:03 +01:00
|
|
|
std::string name_space,
|
|
|
|
std::string cxx_modules_directory, bool exportOld,
|
2021-09-14 00:13:48 +02:00
|
|
|
bool android, cmListFileBacktrace backtrace);
|
2020-08-30 11:54:41 +02:00
|
|
|
cmInstallExportGenerator(const cmInstallExportGenerator&) = delete;
|
2018-01-26 17:06:56 +01:00
|
|
|
~cmInstallExportGenerator() override;
|
2008-10-12 18:41:06 +02:00
|
|
|
|
2020-08-30 11:54:41 +02:00
|
|
|
cmInstallExportGenerator& operator=(const cmInstallExportGenerator&) =
|
|
|
|
delete;
|
|
|
|
|
2016-07-09 11:21:54 +02:00
|
|
|
cmExportSet* GetExportSet() { return this->ExportSet; }
|
2013-03-16 19:13:01 +02:00
|
|
|
|
2019-11-11 23:01:05 +01:00
|
|
|
bool Compute(cmLocalGenerator* lg) override;
|
2015-11-17 17:22:37 +01:00
|
|
|
|
|
|
|
cmLocalGenerator* GetLocalGenerator() const { return this->LocalGenerator; }
|
2013-03-16 19:13:01 +02:00
|
|
|
|
|
|
|
const std::string& GetNamespace() const { return this->Namespace; }
|
|
|
|
|
2021-09-14 00:13:48 +02:00
|
|
|
std::string const& GetMainImportFile() const { return this->MainImportFile; }
|
|
|
|
|
2016-07-09 11:21:54 +02:00
|
|
|
std::string const& GetDestination() const { return this->Destination; }
|
2020-02-01 23:06:01 +01:00
|
|
|
std::string GetDestinationFile() const;
|
2021-09-14 00:13:48 +02:00
|
|
|
std::string GetFileName() const { return this->FileName; }
|
2022-08-04 22:12:04 +02:00
|
|
|
std::string GetTempDir() const;
|
2022-11-16 20:14:03 +01:00
|
|
|
std::string GetCxxModuleDirectory() const
|
|
|
|
{
|
|
|
|
return this->CxxModulesDirectory;
|
|
|
|
}
|
2015-08-17 11:37:30 +02:00
|
|
|
|
2013-03-16 19:13:01 +02:00
|
|
|
protected:
|
2018-01-26 17:06:56 +01:00
|
|
|
void GenerateScript(std::ostream& os) override;
|
|
|
|
void GenerateScriptConfigs(std::ostream& os, Indent indent) override;
|
|
|
|
void GenerateScriptActions(std::ostream& os, Indent indent) override;
|
2013-03-16 19:13:01 +02:00
|
|
|
void GenerateImportFile(cmExportSet const* exportSet);
|
|
|
|
void GenerateImportFile(const char* config, cmExportSet const* exportSet);
|
2022-08-04 22:12:04 +02:00
|
|
|
std::string TempDirCalculate() const;
|
2008-10-12 18:41:06 +02:00
|
|
|
void ComputeTempDir();
|
|
|
|
|
2020-08-30 11:54:41 +02:00
|
|
|
cmExportSet* const ExportSet;
|
|
|
|
std::string const FilePermissions;
|
|
|
|
std::string const FileName;
|
|
|
|
std::string const Namespace;
|
2022-11-16 20:14:03 +01:00
|
|
|
std::string const CxxModulesDirectory;
|
2020-08-30 11:54:41 +02:00
|
|
|
bool const ExportOld;
|
2022-08-04 22:12:04 +02:00
|
|
|
cmLocalGenerator* LocalGenerator = nullptr;
|
2008-10-12 18:41:06 +02:00
|
|
|
|
|
|
|
std::string TempDir;
|
|
|
|
std::string MainImportFile;
|
2020-08-30 11:54:41 +02:00
|
|
|
std::unique_ptr<cmExportInstallFileGenerator> EFGen;
|
2008-10-12 18:41:06 +02:00
|
|
|
};
|