From dd4e8df29a6f024890df32e9b223537ef204b102 Mon Sep 17 00:00:00 2001 From: Bill Hoffman Date: Thu, 28 Aug 2003 16:22:46 -0400 Subject: [PATCH] BUG: make sure exe output path is used for dep hack stuff --- Source/cmLocalVisualStudio6Generator.cxx | 16 ++++++++++++++-- Source/cmLocalVisualStudio7Generator.cxx | 16 ++++++++++++++-- 2 files changed, 28 insertions(+), 4 deletions(-) diff --git a/Source/cmLocalVisualStudio6Generator.cxx b/Source/cmLocalVisualStudio6Generator.cxx index 393e5a88d..3168f8189 100644 --- a/Source/cmLocalVisualStudio6Generator.cxx +++ b/Source/cmLocalVisualStudio6Generator.cxx @@ -467,9 +467,21 @@ void cmLocalVisualStudio6Generator::WriteCustomRule(std::ostream& fout, const char* cacheValue = m_Makefile->GetDefinition(libPath.c_str()); if (cacheValue) { - libPath = cacheValue; + std::string exePath = ""; + if (m_Makefile->GetDefinition("EXECUTABLE_OUTPUT_PATH")) + { + exePath = m_Makefile->GetDefinition("EXECUTABLE_OUTPUT_PATH"); + } + if(exePath.size()) + { + libPath = exePath; + } + else + { + libPath = cacheValue; + } libPath += "/"; - libPath += "$(INTDIR)"; + libPath += "$(INTDIR)/"; libPath += dep; libPath += ".exe"; fout << "\\\n\t" << diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx index 773a22f8b..979e4d907 100644 --- a/Source/cmLocalVisualStudio7Generator.cxx +++ b/Source/cmLocalVisualStudio7Generator.cxx @@ -870,8 +870,20 @@ WriteCustomRule(std::ostream& fout, std::string libPath = dep + "_CMAKE_PATH"; const char* cacheValue = m_Makefile->GetDefinition(libPath.c_str()); if (cacheValue) - { - libPath = cacheValue; + { + std::string exePath = ""; + if (m_Makefile->GetDefinition("EXECUTABLE_OUTPUT_PATH")) + { + exePath = m_Makefile->GetDefinition("EXECUTABLE_OUTPUT_PATH"); + } + if(exePath.size()) + { + libPath = exePath; + } + else + { + libPath = cacheValue; + } libPath += "/"; libPath += "$(INTDIR)"; libPath += dep;