mirror of
https://github.com/reactos/CMake.git
synced 2025-01-21 02:45:05 +00:00
BUG: add link directories for target link libraries and add a test for it
This commit is contained in:
parent
e8e42bde66
commit
4591e41a62
@ -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;
|
||||
}
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
# a simple test case
|
||||
PROJECT (simple)
|
||||
ADD_EXECUTABLE (simple simple.cxx)
|
||||
ADD_LIBRARY(simpleLib STATIC simpleLib.cxx)
|
||||
TARGET_LINK_LIBRARIES(simple simpleLib)
|
||||
|
@ -1,4 +1,6 @@
|
||||
extern void simpleLib();
|
||||
int main ()
|
||||
{
|
||||
simpleLib();
|
||||
return 0;
|
||||
}
|
||||
|
3
Tests/Simple/simpleLib.cxx
Normal file
3
Tests/Simple/simpleLib.cxx
Normal file
@ -0,0 +1,3 @@
|
||||
void simpleLib()
|
||||
{
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user