From: Wheeler, F. (Research) <wh...@cr...> - 2002-06-21 23:14:37
|
Amitha, > The biggest drawback to this is that the UseXXX will have to do > indiscriminate LINK_LIBRARIES, which can propagate incorrect > dependencies, potentially leading to unnecessarily complicated link > lines. This is especially so because LINK_LIBRARIES are propagated to > subdirectories, where as the TARGET_... are not. Still, vxl seems to > be building and not too many people complaining, so it can't be all > bad. I see, you could not use the preferred TARGET_ function in an include file. What CMake needs is a way to define functions! INCLUDE( .../FindXXX.cmake ) # finds files and defines UseXXX call UseXXX( <my target exec or library> ) > > Again, I suggest this go in "UseVGUI.cmake". > > And I admit that this case irks me enough that I'm tempted to agree > with you even if there were no consistency in the UseXs. Perhaps the "policy" should be that any library that wants to provide a UseXXX.cmake file (with LINK_LIBRARIES commands) is welcome to, and users of the library are free to use it or ignore it. At worst it lets the library provider document in a familiar place what needs to be included and linked to use the library for the more complicated cases. -Fred |