summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalGenerator.cxx
diff options
context:
space:
mode:
authorGregor Jasny <gjasny@googlemail.com>2015-08-13 10:03:02 (GMT)
committerGregor Jasny <gjasny@googlemail.com>2015-08-25 19:53:51 (GMT)
commit48fe617e667d2e6b1e471cfb56346de51f984ba5 (patch)
treeec16d9400d62f5f26775ac7cf4699c5162d61e5c /Source/cmGlobalGenerator.cxx
parentd2c2319d6479d4319ef298f6178b00e953a9b179 (diff)
downloadCMake-48fe617e667d2e6b1e471cfb56346de51f984ba5.zip
CMake-48fe617e667d2e6b1e471cfb56346de51f984ba5.tar.gz
CMake-48fe617e667d2e6b1e471cfb56346de51f984ba5.tar.bz2
Fix installation of iOS targets (#12506)
Since cmTarget::ComputeOutputDir results can be used in CMake code of script cmake_install.cmake and in Xcode internals, string ${EFFECTIVE_PLATFORM_NAME} should be used instead of $(EFFECTIVE_PLATFORM_NAME) because it works for both. Value of CMAKE_CFG_INTDIR can't be used in BUILD_TYPE argument of install command since it contains $(EFFECTIVE_PLATFORM_NAME) (e.g. equals to `Release-iphoneos`, `Debug-iphoneos`, etc.).
Diffstat (limited to 'Source/cmGlobalGenerator.cxx')
-rw-r--r--Source/cmGlobalGenerator.cxx12
1 files changed, 11 insertions, 1 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 503c455..40f1fcf 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -2427,7 +2427,17 @@ void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets)
if ( cmakeCfgIntDir && *cmakeCfgIntDir && cmakeCfgIntDir[0] != '.' )
{
std::string cfgArg = "-DBUILD_TYPE=";
- cfgArg += mf->GetDefinition("CMAKE_CFG_INTDIR");
+ bool iosPlatform = mf->PlatformIsAppleIos();
+ if(iosPlatform)
+ {
+ cfgArg += "$(CONFIGURATION)";
+ singleLine.push_back(cfgArg);
+ cfgArg = "-DEFFECTIVE_PLATFORM_NAME=$(EFFECTIVE_PLATFORM_NAME)";
+ }
+ else
+ {
+ cfgArg += mf->GetDefinition("CMAKE_CFG_INTDIR");
+ }
singleLine.push_back(cfgArg);
}
singleLine.push_back("-P");