mirror of
https://github.com/Kitware/CMake.git
synced 2025-06-15 08:30:44 +08:00

Add initial support for exporting (install only, for now) Common Package Specification (https://cps-org.github.io/cps/) format package descriptions. This has some limitations, such as not supporting generator expressions (as these cannot be portably exported), and only partially supporting transitive dependencies, but should be usable for at least some simple cases. (Actually, $<LINK_ONLY> is theoretically supportable, but is not yet implemented.) This still needs tests; these will be added in the next commit. Other potential improvements include support for language-specific compile definitions and inferring some package properties from project properties. Additionally, there is no module support yet; this is partly pending on having a tool agnostic format for providing the necessary information.
37 lines
1.5 KiB
C++
37 lines
1.5 KiB
C++
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
|
file Copyright.txt or https://cmake.org/licensing for details. */
|
|
#include "cmInstallPackageInfoExportGenerator.h"
|
|
|
|
#include <utility>
|
|
|
|
#include <cm/memory>
|
|
|
|
#include "cmExportInstallFileGenerator.h"
|
|
#include "cmExportInstallPackageInfoGenerator.h"
|
|
#include "cmListFileCache.h"
|
|
|
|
class cmExportSet;
|
|
|
|
cmInstallPackageInfoExportGenerator::cmInstallPackageInfoExportGenerator(
|
|
cmExportSet* exportSet, std::string destination, std::string filePermissions,
|
|
std::vector<std::string> const& configurations, std::string component,
|
|
MessageLevel message, bool excludeFromAll, std::string filename,
|
|
std::string packageName, std::string version, std::string versionCompat,
|
|
std::string versionSchema, std::vector<std::string> defaultTargets,
|
|
std::vector<std::string> defaultConfigurations,
|
|
std::string cxxModulesDirectory, cmListFileBacktrace backtrace)
|
|
: cmInstallExportGenerator(
|
|
exportSet, std::move(destination), std::move(filePermissions),
|
|
configurations, std::move(component), message, excludeFromAll,
|
|
std::move(filename), packageName + "::", std::move(cxxModulesDirectory),
|
|
std::move(backtrace))
|
|
{
|
|
this->EFGen = cm::make_unique<cmExportInstallPackageInfoGenerator>(
|
|
this, std::move(packageName), std::move(version), std::move(versionCompat),
|
|
std::move(versionSchema), std::move(defaultTargets),
|
|
std::move(defaultConfigurations));
|
|
}
|
|
|
|
cmInstallPackageInfoExportGenerator::~cmInstallPackageInfoExportGenerator() =
|
|
default;
|