diff options
author | Brad King <brad.king@kitware.com> | 2014-05-07 13:13:37 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2014-05-07 13:13:37 (GMT) |
commit | 2e095099ece5bb50a6c8db91f0cb5ac9162f3e8f (patch) | |
tree | ee5276eef94495420f68e222d9dfae268f5407ff /Source | |
parent | 3e2e15eead24ae5cdfefff60cdda9d145948718d (diff) | |
parent | 1bed75a590707c311de6feddafdfb32cbb9e4afb (diff) | |
download | CMake-2e095099ece5bb50a6c8db91f0cb5ac9162f3e8f.zip CMake-2e095099ece5bb50a6c8db91f0cb5ac9162f3e8f.tar.gz CMake-2e095099ece5bb50a6c8db91f0cb5ac9162f3e8f.tar.bz2 |
Merge topic 'osx-iframework'
1bed75a5 OS X: Use -iframework for system framework directories
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmLocalGenerator.cxx | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index f375b5f..c4c6428 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -1344,6 +1344,12 @@ std::string cmLocalGenerator::GetIncludeFlags( const char* fwSearchFlag = this->Makefile->GetDefinition(fwSearchFlagVar); + std::string sysFwSearchFlagVar = "CMAKE_"; + sysFwSearchFlagVar += lang; + sysFwSearchFlagVar += "_SYSTEM_FRAMEWORK_SEARCH_FLAG"; + const char* sysFwSearchFlag = + this->Makefile->GetDefinition(sysFwSearchFlagVar); + bool flagUsed = false; std::set<std::string> emitted; #ifdef __APPLE__ @@ -1360,9 +1366,17 @@ std::string cmLocalGenerator::GetIncludeFlags( frameworkDir = cmSystemTools::CollapseFullPath(frameworkDir.c_str()); if(emitted.insert(frameworkDir).second) { - includeFlags - << fwSearchFlag << this->Convert(frameworkDir, - START_OUTPUT, shellFormat, true) + if (sysFwSearchFlag && target && + target->IsSystemIncludeDirectory(*i, config)) + { + includeFlags << sysFwSearchFlag; + } + else + { + includeFlags << fwSearchFlag; + } + includeFlags << this->Convert(frameworkDir, START_OUTPUT, + shellFormat, true) << " "; } continue; |