summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-10-17 12:54:15 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-10-18 14:29:30 (GMT)
commit97062ac268d1bcc62a528aea2e22a7dd6f6efa8f (patch)
tree4f5d7e07e230394cbff32618b534509c2d8e1d9e
parent6a72b3c84e016d7e540aa3d9b079200b3fb52ab7 (diff)
downloadCMake-97062ac268d1bcc62a528aea2e22a7dd6f6efa8f.zip
CMake-97062ac268d1bcc62a528aea2e22a7dd6f6efa8f.tar.gz
CMake-97062ac268d1bcc62a528aea2e22a7dd6f6efa8f.tar.bz2
cmInstallTargetGenerator: Port GetInstallFilename to cmGeneratorTarget.
-rw-r--r--Source/cmExportInstallFileGenerator.cxx4
-rw-r--r--Source/cmInstallTargetGenerator.cxx19
-rw-r--r--Source/cmInstallTargetGenerator.h3
3 files changed, 11 insertions, 15 deletions
diff --git a/Source/cmExportInstallFileGenerator.cxx b/Source/cmExportInstallFileGenerator.cxx
index da963f3..67697f8 100644
--- a/Source/cmExportInstallFileGenerator.cxx
+++ b/Source/cmExportInstallFileGenerator.cxx
@@ -399,7 +399,7 @@ cmExportInstallFileGenerator
}
// Get the target to be installed.
- cmTarget* target = itgen->GetTarget()->Target;
+ cmGeneratorTarget* target = itgen->GetTarget();
// Construct the installed location of the target.
std::string dest = itgen->GetDestination(config);
@@ -433,7 +433,7 @@ cmExportInstallFileGenerator
prop += suffix;
// Append the installed file name.
- if(target->IsAppBundleOnApple())
+ if(target->Target->IsAppBundleOnApple())
{
value += itgen->GetInstallFilename(target, config);
value += ".app/Contents/MacOS/";
diff --git a/Source/cmInstallTargetGenerator.cxx b/Source/cmInstallTargetGenerator.cxx
index 2f08165..c2798b2 100644
--- a/Source/cmInstallTargetGenerator.cxx
+++ b/Source/cmInstallTargetGenerator.cxx
@@ -359,34 +359,31 @@ cmInstallTargetGenerator::GetInstallFilename(const std::string& config) const
{
NameType nameType = this->ImportLibrary? NameImplib : NameNormal;
return
- cmInstallTargetGenerator::GetInstallFilename(this->Target->Target, config,
+ cmInstallTargetGenerator::GetInstallFilename(this->Target, config,
nameType);
}
//----------------------------------------------------------------------------
std::string
-cmInstallTargetGenerator::GetInstallFilename(cmTarget const* target,
+cmInstallTargetGenerator::GetInstallFilename(cmGeneratorTarget const* target,
const std::string& config,
NameType nameType)
{
std::string fname;
// Compute the name of the library.
- cmGeneratorTarget *gtgt = target->GetMakefile()
- ->GetGlobalGenerator()
- ->GetGeneratorTarget(target);
if(target->GetType() == cmState::EXECUTABLE)
{
std::string targetName;
std::string targetNameReal;
std::string targetNameImport;
std::string targetNamePDB;
- gtgt->GetExecutableNames(targetName, targetNameReal,
+ target->GetExecutableNames(targetName, targetNameReal,
targetNameImport, targetNamePDB,
config);
if(nameType == NameImplib)
{
// Use the import library name.
- if(!gtgt->GetImplibGNUtoMS(targetNameImport, fname,
+ if(!target->GetImplibGNUtoMS(targetNameImport, fname,
"${CMAKE_IMPORT_LIBRARY_SUFFIX}"))
{
fname = targetNameImport;
@@ -410,12 +407,12 @@ cmInstallTargetGenerator::GetInstallFilename(cmTarget const* target,
std::string targetNameReal;
std::string targetNameImport;
std::string targetNamePDB;
- gtgt->GetLibraryNames(targetName, targetNameSO, targetNameReal,
+ target->GetLibraryNames(targetName, targetNameSO, targetNameReal,
targetNameImport, targetNamePDB, config);
if(nameType == NameImplib)
{
// Use the import library name.
- if(!gtgt->GetImplibGNUtoMS(targetNameImport, fname,
+ if(!target->GetImplibGNUtoMS(targetNameImport, fname,
"${CMAKE_IMPORT_LIBRARY_SUFFIX}"))
{
fname = targetNameImport;
@@ -585,7 +582,7 @@ cmInstallTargetGenerator
// The directory portions differ. Append the filename to
// create the mapping.
std::string fname =
- this->GetInstallFilename(tgt->Target, config, NameSO);
+ this->GetInstallFilename(tgt, config, NameSO);
// Map from the build-tree install_name.
for_build += fname;
@@ -622,7 +619,7 @@ cmInstallTargetGenerator
{
// Prepare to refer to the install-tree install_name.
new_id = for_install;
- new_id += this->GetInstallFilename(this->Target->Target, config, NameSO);
+ new_id += this->GetInstallFilename(this->Target, config, NameSO);
}
}
diff --git a/Source/cmInstallTargetGenerator.h b/Source/cmInstallTargetGenerator.h
index a8f4a75..ec89c05 100644
--- a/Source/cmInstallTargetGenerator.h
+++ b/Source/cmInstallTargetGenerator.h
@@ -14,7 +14,6 @@
#include "cmInstallGenerator.h"
-class cmTarget;
class cmGeneratorTarget;
/** \class cmInstallTargetGenerator
@@ -54,7 +53,7 @@ public:
NameReal
};
- static std::string GetInstallFilename(cmTarget const* target,
+ static std::string GetInstallFilename(const cmGeneratorTarget* target,
const std::string& config,
NameType nameType = NameNormal);