IOS_INSTALL_COMBINED: Support Xcode 12 (command line only)

Xcode 12 doesn't allow nested builds within the same build directory.
That means we can no longer do an install by building the install target
when IOS_INSTALL_COMBINED is true. We can, however, still do an install
by running the cmake_install.cmake script or executing cmake --install,
since there is no outer build and therefore the associated SDK can be
built as a sub-build.

The non-build methods previously didn't work when
IOS_INSTALL_COMBINED was true because the generated install script
and the CMakeIOSInstallCombined script both made certain assumptions
that relied on being part of a build. Those assumptions are now
removed. A side-effect of this work is that cpack now also works from the
command line when IOS_INSTALL_COMBINED is true.

Relates: #21282
Fixes: #20023
This commit is contained in:
Craig Scott
2021-02-08 17:30:48 +11:00
parent f0257a87a3
commit 0110aa018d
8 changed files with 109 additions and 21 deletions

View File

@@ -32,7 +32,7 @@ public:
void AppendFlagEscape(std::string& flags,
const std::string& rawFlag) const override;
void Generate() override;
virtual void GenerateInstallRules();
void AddGeneratorSpecificInstallSetup(std::ostream& os) override;
void ComputeObjectFilenames(
std::map<cmSourceFile const*, std::string>& mapping,
cmGeneratorTarget const* gt = nullptr) override;