export: Factor out CMake-specific export generation (1/2)

In order to support generation of Common Package Specifications, the
mechanisms CMake uses to export package information need to be made more
abstract. As a first step toward this, refactor cmInstallExportGenerator
so that logic specific to config.cmake and Android .mk lives in separate
subclasses.

While we're at it, clean up the code style a bit and try to use moves a
bit more consistently.

This is step 1 of 2. The next step will refactor the individual file
generators along similar lines, which will also involve creating
additional classes for format-agnostic logic that is shared between
build-tree and install-tree variants.
This commit is contained in:
Matthew Woehlke
2024-07-04 16:36:37 -04:00
parent 0352376e44
commit a6cc595772
13 changed files with 242 additions and 82 deletions

View File

@@ -207,6 +207,8 @@ protected:
virtual cmExportSet* GetExportSet() const { return nullptr; }
std::string GetCxxModuleFile(std::string const& name) const;
void SetRequiredCMakeVersion(unsigned int major, unsigned int minor,
unsigned int patch);