| 52 | } |
| 53 | |
| 54 | void cmLocalXCodeGenerator::AddGeneratorSpecificInstallSetup(std::ostream& os) |
| 55 | { |
| 56 | // First check if we need to warn about incompatible settings |
| 57 | for (auto const& target : this->GetGeneratorTargets()) { |
| 58 | target->HasMacOSXRpathInstallNameDir(""); |
| 59 | } |
| 60 | |
| 61 | // CMakeIOSInstallCombined.cmake needs to know the location of the top of |
| 62 | // the build directory |
| 63 | os << "set(CMAKE_BINARY_DIR \"" << this->GetBinaryDirectory() << "\")\n\n"; |
| 64 | |
| 65 | if (this->Makefile->PlatformIsAppleEmbedded()) { |
| 66 | std::string platformName; |
| 67 | switch (this->Makefile->GetAppleSDKType()) { |
| 68 | case cmMakefile::AppleSDK::IPhoneOS: |
| 69 | platformName = "iphoneos"; |
| 70 | break; |
| 71 | case cmMakefile::AppleSDK::IPhoneSimulator: |
| 72 | platformName = "iphonesimulator"; |
| 73 | break; |
| 74 | case cmMakefile::AppleSDK::AppleTVOS: |
| 75 | platformName = "appletvos"; |
| 76 | break; |
| 77 | case cmMakefile::AppleSDK::AppleTVSimulator: |
| 78 | platformName = "appletvsimulator"; |
| 79 | break; |
| 80 | case cmMakefile::AppleSDK::WatchOS: |
| 81 | platformName = "watchos"; |
| 82 | break; |
| 83 | case cmMakefile::AppleSDK::WatchSimulator: |
| 84 | platformName = "watchsimulator"; |
| 85 | break; |
| 86 | case cmMakefile::AppleSDK::XROS: |
| 87 | platformName = "xros"; |
| 88 | break; |
| 89 | case cmMakefile::AppleSDK::XRSimulator: |
| 90 | platformName = "xrsimulator"; |
| 91 | break; |
| 92 | case cmMakefile::AppleSDK::MacOS: |
| 93 | break; |
| 94 | } |
| 95 | if (!platformName.empty()) { |
| 96 | // The effective platform name is just the platform name with a hyphen |
| 97 | // prepended. We can get the SUPPORTED_PLATFORMS from the project file |
| 98 | // at runtime, so we don't need to compute that here. |
| 99 | /* clang-format off */ |
| 100 | os << |
| 101 | "if(NOT PLATFORM_NAME)\n" |
| 102 | " if(NOT \"$ENV{PLATFORM_NAME}\" STREQUAL \"\")\n" |
| 103 | " set(PLATFORM_NAME \"$ENV{PLATFORM_NAME}\")\n" |
| 104 | " endif()\n" |
| 105 | " if(NOT PLATFORM_NAME)\n" |
| 106 | " set(PLATFORM_NAME " << platformName << ")\n" |
| 107 | " endif()\n" |
| 108 | "endif()\n\n" |
| 109 | "if(NOT EFFECTIVE_PLATFORM_NAME)\n" |
| 110 | " if(NOT \"$ENV{EFFECTIVE_PLATFORM_NAME}\" STREQUAL \"\")\n" |
| 111 | " set(EFFECTIVE_PLATFORM_NAME \"$ENV{EFFECTIVE_PLATFORM_NAME}\")\n" |
nothing calls this directly
no test coverage detected