diff options
author | Alex Neundorf <neundorf@kde.org> | 2010-05-01 12:29:13 (GMT) |
---|---|---|
committer | Alex Neundorf <neundorf@kde.org> | 2010-05-01 18:38:28 (GMT) |
commit | 3901e0408c77c3a072ebd7f3276e2ebdf47bf5eb (patch) | |
tree | e84a53ee9e853e08a50b34c40b58e1a88963a0f5 /Source/cmLocalGenerator.cxx | |
parent | 42c40884d2ef3440c81d2ed13521573f24b12cf3 (diff) | |
download | CMake-3901e0408c77c3a072ebd7f3276e2ebdf47bf5eb.zip CMake-3901e0408c77c3a072ebd7f3276e2ebdf47bf5eb.tar.gz CMake-3901e0408c77c3a072ebd7f3276e2ebdf47bf5eb.tar.bz2 |
-improve crosscompiling from Linux to iphone (#10526)
Patch by Karol Krizka
Alex
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r-- | Source/cmLocalGenerator.cxx | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 851e34f..fd3508e 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -712,9 +712,7 @@ void cmLocalGenerator::AddBuildTargetRule(const char* llang, cmTarget& target) std::string langFlags; this->AddLanguageFlags(langFlags, llang, 0); -#ifdef __APPLE__ this->AddArchitectureFlags(langFlags, &target, llang, 0); -#endif /* __APPLE__ */ vars.LanguageCompileFlags = langFlags.c_str(); cmCustomCommandLines commandLines; @@ -1272,8 +1270,8 @@ const char* cmLocalGenerator::GetIncludeFlags(const char* lang) #endif for(i = includes.begin(); i != includes.end(); ++i) { -#ifdef __APPLE__ - if(cmSystemTools::IsPathToFramework(i->c_str())) + if(this->Makefile->IsOn("APPLE") + && cmSystemTools::IsPathToFramework(i->c_str())) { std::string frameworkDir = *i; frameworkDir += "/../"; @@ -1288,7 +1286,7 @@ const char* cmLocalGenerator::GetIncludeFlags(const char* lang) } continue; } -#endif + std::string include = *i; if(!flagUsed || repeatFlag) { @@ -1766,12 +1764,17 @@ void cmLocalGenerator::OutputLinkLibraries(std::ostream& fout, //---------------------------------------------------------------------------- -#ifdef __APPLE__ void cmLocalGenerator::AddArchitectureFlags(std::string& flags, cmTarget* target, const char *lang, const char* config) { + // Only add Mac OS X specific flags on Darwin platforms (OSX and iphone): + if(!this->Makefile->IsOn("APPLE")) + { + return; + } + if(this->EmitUniversalBinaryFlags) { std::vector<std::string> archs; @@ -1828,7 +1831,6 @@ void cmLocalGenerator::AddArchitectureFlags(std::string& flags, } } } -#endif /* __APPLE__ */ //---------------------------------------------------------------------------- |