[cmake-commits] king committed cmInstallTargetGenerator.cxx 1.26 1.27
cmake-commits at cmake.org
cmake-commits at cmake.org
Fri Mar 16 15:28:32 EST 2007
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv2420
Modified Files:
cmInstallTargetGenerator.cxx
Log Message:
BUG: Use GetExecutableNames instead of GetLibraryNames to compute the installation file name for executable targets.
Index: cmInstallTargetGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmInstallTargetGenerator.cxx,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -d -r1.26 -r1.27
--- cmInstallTargetGenerator.cxx 9 Mar 2007 14:30:16 -0000 1.26
+++ cmInstallTargetGenerator.cxx 16 Mar 2007 20:28:30 -0000 1.27
@@ -204,27 +204,40 @@
}
// Compute the name of the library.
- std::string targetName;
- std::string targetNameSO;
- std::string targetNameReal;
- std::string targetNameImport;
- std::string targetNamePDB;
- target->GetLibraryNames(targetName, targetNameSO, targetNameReal,
- targetNameImport, targetNamePDB, i->c_str());
- if(this->ImportLibrary)
- {
- // Use the import library name.
- fname += targetNameImport;
- }
- else if(useSOName)
+ if(target->GetType() == cmTarget::EXECUTABLE)
{
- // Use the soname.
- fname += targetNameSO;
+ std::string targetName;
+ std::string targetNameReal;
+ std::string targetNamePDB;
+ target->GetExecutableNames(targetName, targetNameReal,
+ targetNamePDB, i->c_str());
+ // Use the canonical name.
+ fname += targetName;
}
else
{
- // Use the canonical name.
- fname += targetName;
+ std::string targetName;
+ std::string targetNameSO;
+ std::string targetNameReal;
+ std::string targetNameImport;
+ std::string targetNamePDB;
+ target->GetLibraryNames(targetName, targetNameSO, targetNameReal,
+ targetNameImport, targetNamePDB, i->c_str());
+ if(this->ImportLibrary)
+ {
+ // Use the import library name.
+ fname += targetNameImport;
+ }
+ else if(useSOName)
+ {
+ // Use the soname.
+ fname += targetNameSO;
+ }
+ else
+ {
+ // Use the canonical name.
+ fname += targetName;
+ }
}
// Set a variable with the target name for this configuration.
@@ -242,28 +255,41 @@
if(this->ConfigurationTypes->empty())
{
// Reference the target by its one configuration name.
- std::string targetName;
- std::string targetNameSO;
- std::string targetNameReal;
- std::string targetNameImport;
- std::string targetNamePDB;
- target->GetLibraryNames(targetName, targetNameSO, targetNameReal,
- targetNameImport, targetNamePDB,
- this->ConfigurationName);
- if(this->ImportLibrary)
- {
- // Use the import library name.
- return targetNameImport;
- }
- else if(useSOName)
+ if(target->GetType() == cmTarget::EXECUTABLE)
{
- // Use the soname.
- return targetNameSO;
+ std::string targetName;
+ std::string targetNameReal;
+ std::string targetNamePDB;
+ target->GetExecutableNames(targetName, targetNameReal,
+ targetNamePDB, this->ConfigurationName);
+ // Use the canonical name.
+ return targetName;
}
else
{
- // Use the canonical name.
- return targetName;
+ std::string targetName;
+ std::string targetNameSO;
+ std::string targetNameReal;
+ std::string targetNameImport;
+ std::string targetNamePDB;
+ target->GetLibraryNames(targetName, targetNameSO, targetNameReal,
+ targetNameImport, targetNamePDB,
+ this->ConfigurationName);
+ if(this->ImportLibrary)
+ {
+ // Use the import library name.
+ return targetNameImport;
+ }
+ else if(useSOName)
+ {
+ // Use the soname.
+ return targetNameSO;
+ }
+ else
+ {
+ // Use the canonical name.
+ return targetName;
+ }
}
}
else
More information about the Cmake-commits
mailing list