summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2006-07-06 20:04:49 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2006-07-06 20:04:49 (GMT)
commit5a71f83f7a23a683b6da7cca2735736db6318353 (patch)
tree949f5578d23c0c6eff93bc430fd3b34bae38250b /Source
parent9e9653713cf10727c05049da50dc153be237be30 (diff)
downloadCMake-5a71f83f7a23a683b6da7cca2735736db6318353.zip
CMake-5a71f83f7a23a683b6da7cca2735736db6318353.tar.gz
CMake-5a71f83f7a23a683b6da7cca2735736db6318353.tar.bz2
BUG: Several fixes to handle bundle content on Mac OSX
Diffstat (limited to 'Source')
-rw-r--r--Source/cmMakefileExecutableTargetGenerator.cxx5
-rw-r--r--Source/cmMakefileTargetGenerator.cxx11
-rw-r--r--Source/cmSetSourceFilesPropertiesCommand.cxx2
3 files changed, 16 insertions, 2 deletions
diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx
index f00105b..8f82c25 100644
--- a/Source/cmMakefileExecutableTargetGenerator.cxx
+++ b/Source/cmMakefileExecutableTargetGenerator.cxx
@@ -76,6 +76,11 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink)
obj != this->Objects.end(); ++obj)
{
objTarget = relPath;
+ // Handle extra content on Mac bundles
+ if ( this->ExtraContent.find(*obj) != this->ExtraContent.end() )
+ {
+ objTarget = "";
+ }
objTarget += *obj;
depends.push_back(objTarget);
}
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx
index 0f1a087..5ca3bb8 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -309,8 +309,11 @@ void cmMakefileTargetGenerator::WriteObjectRuleFiles(cmSourceFile& source)
this->ExtraContent.insert(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
// use in the build.make, same with depMakeFile
std::vector<std::string> depends;
@@ -346,6 +349,10 @@ cmMakefileTargetGenerator
this->WriteObjectDependRules(source, depends);
std::string relativeObj = this->LocalGenerator->GetHomeRelativeOutputPath();
+ if ( source.GetPropertyAsBool("MACOSX_CONTENT") )
+ {
+ relativeObj = "";
+ }
relativeObj += obj;
if(this->Makefile->GetDefinition("CMAKE_WINDOWS_OBJECT_PATH"))
{
diff --git a/Source/cmSetSourceFilesPropertiesCommand.cxx b/Source/cmSetSourceFilesPropertiesCommand.cxx
index 1884328..8c085ff 100644
--- a/Source/cmSetSourceFilesPropertiesCommand.cxx
+++ b/Source/cmSetSourceFilesPropertiesCommand.cxx
@@ -110,6 +110,8 @@ bool cmSetSourceFilesPropertiesCommand::InitialPass(
propertyPairs.push_back(*j);
propertyPairs.push_back("EXTRA_CONTENT");
propertyPairs.push_back("1");
+ propertyPairs.push_back("MACOSX_CONTENT");
+ propertyPairs.push_back("1");
propertyPairs.push_back("KEEP_EXTENSION");
propertyPairs.push_back("1");
propertyPairs.push_back("LANGUAGE");