Browse Source

fix to executable depends for custom commands

Ken Martin 22 years ago
parent
commit
2b2a9d73da
2 changed files with 24 additions and 4 deletions
  1. 13 3
      Source/cmLocalVisualStudio6Generator.cxx
  2. 11 1
      Source/cmLocalVisualStudio7Generator.cxx

+ 13 - 3
Source/cmLocalVisualStudio6Generator.cxx

@@ -465,10 +465,20 @@ void cmLocalVisualStudio6Generator::WriteCustomRule(std::ostream& fout,
         }
       std::string libPath = dep + "_CMAKE_PATH";
       const char* cacheValue = m_Makefile->GetDefinition(libPath.c_str());
-      if (!cacheValue)
+      if (cacheValue)
         {
-        fout << "\\\n\t" << 
-          cmSystemTools::ConvertToOutputPath(d->c_str());
+        libPath = cacheValue;
+        libPath += "/";
+        libPath += "$(INTDIR)";
+        libPath += dep;
+        libPath += ".exe";
+        fout << cmSystemTools::ConvertToOutputPath(libPath.c_str())
+             << ";";
+        }
+      else
+        {
+        fout << cmSystemTools::ConvertToOutputPath(d->c_str())
+             << ";";
         }
       }
     fout << "\n";

+ 11 - 1
Source/cmLocalVisualStudio7Generator.cxx

@@ -869,7 +869,17 @@ WriteCustomRule(std::ostream& fout,
         }
       std::string libPath = dep + "_CMAKE_PATH";
       const char* cacheValue = m_Makefile->GetDefinition(libPath.c_str());
-      if (!cacheValue)
+      if (cacheValue)
+        {
+        libPath = cacheValue;
+        libPath += "/";
+        libPath += "$(INTDIR)";
+        libPath += dep;
+        libPath += ".exe";
+        fout << this->ConvertToXMLOutputPath(libPath.c_str())
+             << ";";
+        }
+      else
         {
         fout << this->ConvertToXMLOutputPath(d->c_str())
              << ";";