From 2b2a9d73da58786d31a6b7a6636260803782cb79 Mon Sep 17 00:00:00 2001 From: Ken Martin Date: Thu, 28 Aug 2003 16:06:06 -0400 Subject: fix to executable depends for custom commands --- Source/cmLocalVisualStudio6Generator.cxx | 16 +++++++++++++--- Source/cmLocalVisualStudio7Generator.cxx | 12 +++++++++++- 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/Source/cmLocalVisualStudio6Generator.cxx b/Source/cmLocalVisualStudio6Generator.cxx index 8379ec5..df67224 100644 --- a/Source/cmLocalVisualStudio6Generator.cxx +++ b/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"; diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx index d307f2a..773a22f 100644 --- a/Source/cmLocalVisualStudio7Generator.cxx +++ b/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()) << ";"; -- cgit v0.12