diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2003-12-18 18:04:28 (GMT) |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2003-12-18 18:04:28 (GMT) |
commit | c3840b5cc3e26886bab16faf7e27a4ef80f3686d (patch) | |
tree | 854f1415ffa4b5dc377dfee9f213c437bf1b8c18 /Source/cmTargetLinkLibrariesCommand.cxx | |
parent | 31bb398dc332c74726f5a896973450f6518685d1 (diff) | |
download | CMake-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.cxx | 4 |
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 " |