[CMake] FindX11.cmake needs some work for 2.6.0

Bill Hoffman bill.hoffman at kitware.com
Tue Apr 15 08:36:30 EDT 2008


Alan W. Irwin wrote:

> 
>> You should never use -L directly (in TARGET_LINK_LIBRARIES) .....
>> link_directories should be used.
> 
> Our use case is we have a large number of libraries and plugins, but only
> four of those (IIRC) use X11_LIBRARIES.  I prefer to use -L directly in
> TARGET_LINK_LIBRARIES rather than use the LINK_DIRECTORIES alternative 
> since
> the latter would would add an unnecessary (and possibly inefficient)
> directory search for the link steps for most of our libraries/plugins.  Of
> course, this entire issue is moot if -l flags never appear in X11_LIBRARIES
> for any platform because then I could drop the -L flag altogether.
> 

OK, but -L is not even a supported flag for some compilers.

-Bill


More information about the CMake mailing list