summaryrefslogtreecommitdiffstats
path: root/Source/cmTargetLinkLibrariesCommand.cxx
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2003-12-18 18:04:28 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2003-12-18 18:04:28 (GMT)
commitc3840b5cc3e26886bab16faf7e27a4ef80f3686d (patch)
tree854f1415ffa4b5dc377dfee9f213c437bf1b8c18 /Source/cmTargetLinkLibrariesCommand.cxx
parent31bb398dc332c74726f5a896973450f6518685d1 (diff)
downloadCMake-c3840b5cc3e26886bab16faf7e27a4ef80f3686d.zip
CMake-c3840b5cc3e26886bab16faf7e27a4ef80f3686d.tar.gz
CMake-c3840b5cc3e26886bab16faf7e27a4ef80f3686d.tar.bz2
BUG: Fix Bug #445 - Same library in multiple projects can cause problems
Diffstat (limited to 'Source/cmTargetLinkLibrariesCommand.cxx')
-rw-r--r--Source/cmTargetLinkLibrariesCommand.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/cmTargetLinkLibrariesCommand.cxx b/Source/cmTargetLinkLibrariesCommand.cxx
index 6b3e50f..1237fac 100644
--- a/Source/cmTargetLinkLibrariesCommand.cxx
+++ b/Source/cmTargetLinkLibrariesCommand.cxx
@@ -64,7 +64,7 @@ bool cmTargetLinkLibrariesCommand::InitialPass(std::vector<std::string> const& a
std::string libPath = *i + "_CMAKE_PATH";
const char* dir = m_Makefile->GetDefinition(libPath.c_str());
- if( dir )
+ if( dir && *dir )
{
m_Makefile->AddLinkDirectoryForTarget(args[0].c_str(), dir );
}
@@ -91,7 +91,7 @@ void cmTargetLinkLibrariesCommand::FinalPass()
{
libPath = m_HasLocation[cc] + "_CMAKE_PATH";
const char* dir = m_Makefile->GetDefinition(libPath.c_str());
- if ( dir )
+ if ( dir && *dir )
{
std::string str = "Library " + m_HasLocation[cc] +
" is defined using ADD_LIBRARY after the library is used "