<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1491" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2>Hi Bill,</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>This was working with 2.0 and feels natural, but no longer 
works with 2.4.</FONT></DIV>
<DIV><FONT size=2>It boils down to the ordering of 
LINK_DIRECTORIES.</FONT></DIV>
<DIV><FONT size=2>-------------</FONT></DIV>
<DIV><FONT size=2>add_executable(app</FONT></DIV>
<DIV><FONT size=2>&nbsp;&nbsp;&nbsp; src1.cpp src2.cpp ...</FONT></DIV>
<DIV><FONT size=2>&nbsp;&nbsp;&nbsp; )</FONT></DIV>
<DIV><FONT size=2>link_directories(dir1;dir2;dir3)</FONT></DIV>
<DIV><FONT size=2>target_link_libraries(app lib1 lib2 lib3)</FONT></DIV>
<DIV><FONT size=2>--------------</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>This now requires that the 'add_executable' should come 
between 'link_dirs' and 'target_link..'. This is unnecessarily restrictive. Any 
particular reason why CMake has been changed to impose this ?</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>PS:</FONT></DIV>
<DIV><FONT size=2>I have reduced this from the general case of</FONT></DIV>
<DIV><FONT size=2>-----------</FONT></DIV>
<DIV><FONT size=2>add_executable(app ...)</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>find_package(...)</FONT></DIV>
<DIV><FONT size=2>target_link_libraries(app lib1)</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>find_package(...)</FONT></DIV>
<DIV><FONT size=2>target_link_libraries(app lib2)</FONT></DIV>
<DIV><FONT size=2>etc</FONT></DIV>
<DIV><FONT size=2>-----------</FONT></DIV>
<DIV><FONT size=2>Now the add_executable must come after all the 
'find_packages'.</FONT></DIV>
<DIV><FONT size=2>Changing all the old CMakeLists is annoying. Even lowly make 
does not force this type of ordering.</FONT></DIV>
<DIV><FONT size=2>Would like to keep package finding &amp; its use at a single 
place.</FONT></DIV>
<DIV><FONT size=2>Please clarify...&nbsp;</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>Regards,</FONT></DIV>
<DIV><FONT size=2>- Rajiv</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV></BODY></HTML>