BUG: fix for bug 6193, fix xcode depend helper

This commit is contained in:
Bill Hoffman 2008-01-10 15:17:23 -05:00
parent d6a21fc25c
commit d92d51429e
2 changed files with 16 additions and 20 deletions

View File

@ -294,11 +294,6 @@ cmGlobalXCodeGenerator::AddExtraTargets(cmLocalGenerator* root,
} }
cmCustomCommandLines commandLines; cmCustomCommandLines commandLines;
commandLines.push_back(makecommand); commandLines.push_back(makecommand);
mf->AddUtilityCommand("XCODE_DEPEND_HELPER", true,
no_working_directory,
no_depends,
commandLines);
// Add Re-Run CMake rules // Add Re-Run CMake rules
this->CreateReRunCMakeFile(root); this->CreateReRunCMakeFile(root);
@ -316,13 +311,22 @@ cmGlobalXCodeGenerator::AddExtraTargets(cmLocalGenerator* root,
for(cmTargets::iterator l = tgts.begin(); l != tgts.end(); l++) for(cmTargets::iterator l = tgts.begin(); l != tgts.end(); l++)
{ {
cmTarget& target = l->second; cmTarget& target = l->second;
// make all exe, shared libs and modules depend // make all exe, shared libs and modules
// on the XCODE_DEPEND_HELPER target // run the depend check makefile as a post build rule
// this will make sure that when the next target is built
// things are up-to-date
if((target.GetType() == cmTarget::EXECUTABLE || if((target.GetType() == cmTarget::EXECUTABLE ||
target.GetType() == cmTarget::STATIC_LIBRARY ||
target.GetType() == cmTarget::SHARED_LIBRARY || target.GetType() == cmTarget::SHARED_LIBRARY ||
target.GetType() == cmTarget::MODULE_LIBRARY)) target.GetType() == cmTarget::MODULE_LIBRARY))
{ {
target.AddUtility("XCODE_DEPEND_HELPER"); lg->GetMakefile()->AddCustomCommandToTarget(target.GetName(),
no_depends,
commandLines,
cmTarget::POST_BUILD,
"Depend check for xcode",
dir.c_str());
} }
if(!target.GetPropertyAsBool("EXCLUDE_FROM_ALL")) if(!target.GetPropertyAsBool("EXCLUDE_FROM_ALL"))
{ {
@ -2849,6 +2853,7 @@ cmGlobalXCodeGenerator
newDir += "/"; newDir += "/";
newDir += config; newDir += config;
dir = newDir; dir = newDir;
dir += framework;
} }
else else
{ {

View File

@ -238,18 +238,9 @@ cmInstallTargetGenerator
{ {
// Compute the build tree location of the framework directory // Compute the build tree location of the framework directory
std::string from1 = fromDirConfig; std::string from1 = fromDirConfig;
if(config && *config) // Remove trailing slashes... so that from1 ends with ".framework":
{ //
from1 += "/"; cmSystemTools::ConvertToUnixSlashes(from1);
from1 += targetName;
from1 += ".framework";
}
else
{
// Remove trailing slashes... so that from1 ends with ".framework":
//
cmSystemTools::ConvertToUnixSlashes(from1);
}
files.push_back(from1); files.push_back(from1);
type = cmTarget::INSTALL_DIRECTORY; type = cmTarget::INSTALL_DIRECTORY;