diff --git a/Source/cmExportBuildFileGenerator.cxx b/Source/cmExportBuildFileGenerator.cxx
index cf841462182fc957a50a4c5c1d056d0de9e962bf..d191e476730ea858ad9384db98d84b9e7c23633e 100644
--- a/Source/cmExportBuildFileGenerator.cxx
+++ b/Source/cmExportBuildFileGenerator.cxx
@@ -174,7 +174,7 @@ cmExportBuildFileGenerator
       //                              properties);
 
       // Generate code in the export file.
-      this->GenerateImportPropertyCode(os, config, target->Target,
+      this->GenerateImportPropertyCode(os, config, target,
                                        properties);
       }
     }
diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx
index b597b538da1cabab5fd141673bb4572a5b989d10..1c3e9feb1d552b4489c45ab1997b514768643d7e 100644
--- a/Source/cmExportFileGenerator.cxx
+++ b/Source/cmExportFileGenerator.cxx
@@ -1108,13 +1108,13 @@ cmExportFileGenerator
 void
 cmExportFileGenerator
 ::GenerateImportPropertyCode(std::ostream& os, const std::string& config,
-                             cmTarget const* target,
+                             cmGeneratorTarget const* target,
                              ImportPropertyMap const& properties)
 {
   // Construct the imported target name.
   std::string targetName = this->Namespace;
 
-  targetName += target->GetExportName();
+  targetName += target->Target->GetExportName();
 
   // Set the import properties.
   os << "# Import target \"" << targetName << "\" for configuration \""
@@ -1228,13 +1228,13 @@ cmExportFileGenerator::GenerateImportedFileCheckLoop(std::ostream& os)
 //----------------------------------------------------------------------------
 void
 cmExportFileGenerator
-::GenerateImportedFileChecksCode(std::ostream& os, cmTarget* target,
+::GenerateImportedFileChecksCode(std::ostream& os, cmGeneratorTarget* target,
                                  ImportPropertyMap const& properties,
                                 const std::set<std::string>& importedLocations)
 {
   // Construct the imported target name.
   std::string targetName = this->Namespace;
-  targetName += target->GetExportName();
+  targetName += target->Target->GetExportName();
 
   os << "list(APPEND _IMPORT_CHECK_TARGETS " << targetName << " )\n"
         "list(APPEND _IMPORT_CHECK_FILES_FOR_" << targetName << " ";
diff --git a/Source/cmExportFileGenerator.h b/Source/cmExportFileGenerator.h
index be5c6f72ee8d13db217fc7ac416f1965ca553608..18f0b009aa6c7b0fbf3514cd86ffaff8dc01a597 100644
--- a/Source/cmExportFileGenerator.h
+++ b/Source/cmExportFileGenerator.h
@@ -78,9 +78,10 @@ protected:
   void GenerateImportTargetCode(std::ostream& os,
                                 cmGeneratorTarget const* target);
   void GenerateImportPropertyCode(std::ostream& os, const std::string& config,
-                                  cmTarget const* target,
+                                  cmGeneratorTarget const* target,
                                   ImportPropertyMap const& properties);
-  void GenerateImportedFileChecksCode(std::ostream& os, cmTarget* target,
+  void GenerateImportedFileChecksCode(std::ostream& os,
+                                      cmGeneratorTarget* target,
                                       ImportPropertyMap const& properties,
                                const std::set<std::string>& importedLocations);
   void GenerateImportedFileCheckLoop(std::ostream& os);
diff --git a/Source/cmExportInstallFileGenerator.cxx b/Source/cmExportInstallFileGenerator.cxx
index 988b0dc0e04ea07214e507e9b5d2e5f05c47236f..ea5badcc9c1bd2d8449e6bc6bc310c87a0e85e75 100644
--- a/Source/cmExportInstallFileGenerator.cxx
+++ b/Source/cmExportInstallFileGenerator.cxx
@@ -375,8 +375,8 @@ cmExportInstallFileGenerator
       //                              properties);
 
       // Generate code in the export file.
-      this->GenerateImportPropertyCode(os, config, gtgt->Target, properties);
-      this->GenerateImportedFileChecksCode(os, gtgt->Target, properties,
+      this->GenerateImportPropertyCode(os, config, gtgt, properties);
+      this->GenerateImportedFileChecksCode(os, gtgt, properties,
                                            importedLocations);
       }
     }