summaryrefslogtreecommitdiffstats
path: root/Source/cmFileCommand.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2005-02-18 18:32:51 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2005-02-18 18:32:51 (GMT)
commit785b0dc012a2623e83886066fd4929b4e361cea9 (patch)
treeb996432683a83a1716dcc722d12c87fab97d332d /Source/cmFileCommand.cxx
parentb5ca101fd76554df01d60f210677df85e19af65e (diff)
downloadCMake-785b0dc012a2623e83886066fd4929b4e361cea9.zip
CMake-785b0dc012a2623e83886066fd4929b4e361cea9.tar.gz
CMake-785b0dc012a2623e83886066fd4929b4e361cea9.tar.bz2
ENH: all tests are passing for XCode
Diffstat (limited to 'Source/cmFileCommand.cxx')
-rw-r--r--Source/cmFileCommand.cxx50
1 files changed, 33 insertions, 17 deletions
diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx
index bbd3d5a..0bc515c 100644
--- a/Source/cmFileCommand.cxx
+++ b/Source/cmFileCommand.cxx
@@ -580,27 +580,43 @@ bool cmFileCommand::HandleInstallCommand(
}
switch( itype )
{
- case cmTarget::MODULE_LIBRARY:
- case cmTarget::SHARED_LIBRARY:
- case cmTarget::EXECUTABLE:
- case cmTarget::INSTALL_PROGRAMS:
-
- if ( !cmSystemTools::SetPermissions(destfile.c_str(),
+ case cmTarget::STATIC_LIBRARY:
+#if defined(__APPLE_CC__)
+ {
+ std::string ranlib = "ranlib ";
+ ranlib += destfile;
+ if(!cmSystemTools::RunSingleCommand(ranlib.c_str()))
+ {
+ std::string err = "ranlib failed: ";
+ err += ranlib;
+ this->SetError(err.c_str());
+ }
+ }
+#endif
+ break;
+
+ case cmTarget::MODULE_LIBRARY:
+ case cmTarget::SHARED_LIBRARY:
+ case cmTarget::EXECUTABLE:
+ case cmTarget::INSTALL_PROGRAMS:
+
+ if ( !cmSystemTools::SetPermissions(destfile.c_str(),
#if defined( _MSC_VER ) || defined( __MINGW32__ )
- S_IREAD | S_IWRITE | S_IEXEC
+ S_IREAD | S_IWRITE | S_IEXEC
#elif defined( __BORLANDC__ )
- S_IRUSR | S_IWUSR | S_IXUSR
+ S_IRUSR | S_IWUSR | S_IXUSR
#else
- S_IRUSR | S_IWUSR | S_IXUSR |
- S_IRGRP | S_IXGRP |
- S_IROTH | S_IXOTH
+ S_IRUSR | S_IWUSR | S_IXUSR |
+ S_IRGRP | S_IXGRP |
+ S_IROTH | S_IXOTH
#endif
- ) )
- {
- cmOStringStream err;
- err << "Problem setting permissions on file: " << destfile.c_str();
- perror(err.str().c_str());
- }
+ ) )
+ {
+ cmOStringStream err;
+ err << "Problem setting permissions on file: "
+ << destfile.c_str();
+ perror(err.str().c_str());
+ }
}
smanifest_files += ";";
smanifest_files += destfile.substr(destDirLength);