From ae243b21bbeef820bb12eb1fb154600aebffb531 Mon Sep 17 00:00:00 2001 From: Ken Martin Date: Wed, 27 Jun 2001 16:14:14 -0400 Subject: [PATCH] ENH: fix install when executable and lib path set --- Source/cmUnixMakefileGenerator.cxx | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Source/cmUnixMakefileGenerator.cxx b/Source/cmUnixMakefileGenerator.cxx index 7ad6d223e5..bd75c6fee4 100644 --- a/Source/cmUnixMakefileGenerator.cxx +++ b/Source/cmUnixMakefileGenerator.cxx @@ -563,7 +563,7 @@ void cmUnixMakefileGenerator::OutputDependencies(std::ostream& fout) { // if the library is not in the current directory, then get the full // path to it - std::string libpath = cacheValue; + libpath = cacheValue; if(m_LibraryOutputPath.size()) { libpath = m_LibraryOutputPath; @@ -577,7 +577,8 @@ void cmUnixMakefileGenerator::OutputDependencies(std::ostream& fout) else { // library is in current Makefile so use lib as a prefix - libpath = "lib"; + libpath = m_LibraryOutputPath; + libpath += "lib"; } // add the library name libpath += lib2->first; @@ -1019,7 +1020,8 @@ void cmUnixMakefileGenerator::OutputInstallRules(std::ostream& fout) switch (l->second.GetType()) { case cmTarget::LIBRARY: - fout << "\t$(INSTALL_DATA) lib" << l->first; + fout << "\t$(INSTALL_DATA) " << m_LibraryOutputPath << "lib" + << l->first; if(dll) { fout << m_Makefile->GetDefinition("CMAKE_SHLIB_SUFFIX"); @@ -1032,7 +1034,8 @@ void cmUnixMakefileGenerator::OutputInstallRules(std::ostream& fout) break; case cmTarget::WIN32_EXECUTABLE: case cmTarget::EXECUTABLE: - fout << "\t$(INSTALL_PROGRAM) " << l->first + fout << "\t$(INSTALL_PROGRAM) " << m_ExecutableOutputPath + << l->first << cmSystemTools::GetExecutableExtension() << " " << prefix << l->second.GetInstallPath() << "\n"; break;