BUG: Several fixes to handle bundle content on Mac OSX

This commit is contained in:
Andy Cedilnik 2006-07-06 16:04:49 -04:00
parent 9e9653713c
commit 5a71f83f7a
3 changed files with 16 additions and 2 deletions

View File

@ -76,6 +76,11 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink)
obj != this->Objects.end(); ++obj) obj != this->Objects.end(); ++obj)
{ {
objTarget = relPath; objTarget = relPath;
// Handle extra content on Mac bundles
if ( this->ExtraContent.find(*obj) != this->ExtraContent.end() )
{
objTarget = "";
}
objTarget += *obj; objTarget += *obj;
depends.push_back(objTarget); depends.push_back(objTarget);
} }

View File

@ -309,8 +309,11 @@ void cmMakefileTargetGenerator::WriteObjectRuleFiles(cmSourceFile& source)
this->ExtraContent.insert(obj); this->ExtraContent.insert(obj);
} }
this->Objects.push_back(obj); this->Objects.push_back(obj);
std::string relativeObj = this->LocalGenerator->GetHomeRelativeOutputPath();
relativeObj += obj; // TODO: Remove
//std::string relativeObj = this->LocalGenerator->GetHomeRelativeOutputPath();
//relativeObj += obj;
// we compute some depends when writing the depend.make that we will also // we compute some depends when writing the depend.make that we will also
// use in the build.make, same with depMakeFile // use in the build.make, same with depMakeFile
std::vector<std::string> depends; std::vector<std::string> depends;
@ -346,6 +349,10 @@ cmMakefileTargetGenerator
this->WriteObjectDependRules(source, depends); this->WriteObjectDependRules(source, depends);
std::string relativeObj = this->LocalGenerator->GetHomeRelativeOutputPath(); std::string relativeObj = this->LocalGenerator->GetHomeRelativeOutputPath();
if ( source.GetPropertyAsBool("MACOSX_CONTENT") )
{
relativeObj = "";
}
relativeObj += obj; relativeObj += obj;
if(this->Makefile->GetDefinition("CMAKE_WINDOWS_OBJECT_PATH")) if(this->Makefile->GetDefinition("CMAKE_WINDOWS_OBJECT_PATH"))
{ {

View File

@ -110,6 +110,8 @@ bool cmSetSourceFilesPropertiesCommand::InitialPass(
propertyPairs.push_back(*j); propertyPairs.push_back(*j);
propertyPairs.push_back("EXTRA_CONTENT"); propertyPairs.push_back("EXTRA_CONTENT");
propertyPairs.push_back("1"); propertyPairs.push_back("1");
propertyPairs.push_back("MACOSX_CONTENT");
propertyPairs.push_back("1");
propertyPairs.push_back("KEEP_EXTENSION"); propertyPairs.push_back("KEEP_EXTENSION");
propertyPairs.push_back("1"); propertyPairs.push_back("1");
propertyPairs.push_back("LANGUAGE"); propertyPairs.push_back("LANGUAGE");