diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2002-04-19 19:28:43 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2002-04-19 19:28:43 (GMT) |
commit | 4591e41a62233feb8b0b23524459444d6ce63c50 (patch) | |
tree | f314f11d54a1e63ca8119bff6da3dfdabc30144d /Source/cmTargetLinkLibrariesCommand.cxx | |
parent | e8e42bde663afe71c92fd6d62d95a464024ad2f8 (diff) | |
download | CMake-4591e41a62233feb8b0b23524459444d6ce63c50.zip CMake-4591e41a62233feb8b0b23524459444d6ce63c50.tar.gz CMake-4591e41a62233feb8b0b23524459444d6ce63c50.tar.bz2 |
BUG: add link directories for target link libraries and add a test for it
Diffstat (limited to 'Source/cmTargetLinkLibrariesCommand.cxx')
-rw-r--r-- | Source/cmTargetLinkLibrariesCommand.cxx | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/Source/cmTargetLinkLibrariesCommand.cxx b/Source/cmTargetLinkLibrariesCommand.cxx index 50396e5..e6d7689 100644 --- a/Source/cmTargetLinkLibrariesCommand.cxx +++ b/Source/cmTargetLinkLibrariesCommand.cxx @@ -49,7 +49,18 @@ bool cmTargetLinkLibrariesCommand::InitialPass(std::vector<std::string> const& a m_Makefile->AddLinkLibraryForTarget(args[0].c_str(),i->c_str(), cmTarget::GENERAL); } - } + // if this is a library that cmake knows about, and LIBRARY_OUTPUT_PATH + // is not set, then add the link directory + const char* ldir = m_Makefile->GetDefinition("LIBRARY_OUTPUT_PATH"); + if (cmSystemTools::IsOff(ldir)) + { + const char* dir = m_Makefile->GetDefinition(i->c_str()); + if( dir ) + { + m_Makefile->AddLinkDirectory( dir ); + } + } + } return true; } |