diff options
author | Brad King <brad.king@kitware.com> | 2008-02-15 16:22:23 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2008-02-15 16:22:23 (GMT) |
commit | ed76198b840b83d49ee4eba9ca0c7753b41d54cf (patch) | |
tree | 9ccd1f187874b7adc0f79d9f7c5088fa62e6639c /Source/cmLocalUnixMakefileGenerator3.cxx | |
parent | 6ea4eea18387d414d6a982bff3bd2f56cdaa85a5 (diff) | |
download | CMake-ed76198b840b83d49ee4eba9ca0c7753b41d54cf.zip CMake-ed76198b840b83d49ee4eba9ca0c7753b41d54cf.tar.gz CMake-ed76198b840b83d49ee4eba9ca0c7753b41d54cf.tar.bz2 |
ENH: Cleanup building of OS X bundle content
- Fixes repeated rebuild of bundles by Makefile generators
- Add special rules to copy sources to their
MACOSX_PACKAGE_LOCATION bundle directory
- Remove MacOSX_Content language hack
- Remove EXTRA_CONTENT property
- Remove MACOSX_CONTENT
- Remove corresponding special cases in object names
Diffstat (limited to 'Source/cmLocalUnixMakefileGenerator3.cxx')
-rw-r--r-- | Source/cmLocalUnixMakefileGenerator3.cxx | 88 |
1 files changed, 23 insertions, 65 deletions
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index e5038c9..62f1bde 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -1887,74 +1887,32 @@ cmLocalUnixMakefileGenerator3 std::string* nameWithoutTargetDir, bool* hasSourceExtension) { - if(const char* fileTargetDirectory = - source.GetProperty("MACOSX_PACKAGE_LOCATION")) - { - // Special handling for OSX package files. - std::string objectName = - this->GetObjectFileNameWithoutTarget(source, 0, - hasSourceExtension); - if(nameWithoutTargetDir) - { - *nameWithoutTargetDir = objectName; - } - objectName = cmSystemTools::GetFilenameName(objectName.c_str()); - std::string targetName; - std::string targetNameReal; - std::string targetNameImport; - std::string targetNamePDB; - target.GetExecutableNames(targetName, targetNameReal, targetNameImport, - targetNamePDB, this->ConfigurationName.c_str()); - std::string obj; - - // Construct the full path version of the names. - // - // If target is a MACOSX_BUNDLE target, then the package location is - // relative to "${targetDir}/${targetName}.app/Contents"... else it is - // relative to "${targetDir}"... - // - obj = target.GetDirectory(); - obj += "/"; - if ( target.GetPropertyAsBool("MACOSX_BUNDLE") ) - { - obj += targetName + ".app/Contents/"; - } - else - { - // Emit warning here...? MACOSX_PACKAGE_LOCATION is "most useful" in a - // MACOSX_BUNDLE... - } - obj += fileTargetDirectory; - - // Object names are specified relative to the current build dir. - obj = this->Convert(obj.c_str(), START_OUTPUT); - obj += "/"; - obj += objectName; - return obj; - } - else + // Make sure we never hit this old case. + if(source.GetProperty("MACOSX_PACKAGE_LOCATION")) { - // Start with the target directory. - std::string obj = this->GetTargetDirectory(target); - obj += "/"; - - // Get the object file name without the target directory. - std::string::size_type dir_len = 0; - dir_len += strlen(this->Makefile->GetCurrentOutputDirectory()); - dir_len += 1; - dir_len += obj.size(); - std::string objectName = - this->GetObjectFileNameWithoutTarget(source, dir_len, - hasSourceExtension); - if(nameWithoutTargetDir) - { - *nameWithoutTargetDir = objectName; - } + abort(); + } + + // Start with the target directory. + std::string obj = this->GetTargetDirectory(target); + obj += "/"; - // Append the object name to the target directory. - obj += objectName; - return obj; + // Get the object file name without the target directory. + std::string::size_type dir_len = 0; + dir_len += strlen(this->Makefile->GetCurrentOutputDirectory()); + dir_len += 1; + dir_len += obj.size(); + std::string objectName = + this->GetObjectFileNameWithoutTarget(source, dir_len, + hasSourceExtension); + if(nameWithoutTargetDir) + { + *nameWithoutTargetDir = objectName; } + + // Append the object name to the target directory. + obj += objectName; + return obj; } //---------------------------------------------------------------------------- |