[Cmake] "Automatic" LINK_DIRECTORIES under Unix

Bill Hoffman bill.hoffman at kitware.com
Mon Jun 18 09:55:34 EDT 2001


On further thought, I don't think your idea will work.
 LINK_LIBRARIES( vnl )  How will you know where vnl is?
The cache entry may not have been made yet.  

At 08:17 AM 6/18/2001 -0400, Bill Hoffman wrote:
>Sounds like a good idea, however, don't just do it for the Unix build,
>remember this is "C" make.   This could be done easily in the LINK commands.
>They could determine if the directory was part of the tree and pre-pend
>the binary tree path.
>
>Also, I don't see the connection to LIBRARY_OUTPUT_PATH??
>
>-Bill
>
>
>
>At 12:24 AM 6/16/2001 -0400, Amitha Perera wrote:
>>I'd like to modify the Unix makefile generation to do the following:
>>on a LINK_LIBRARIES(abc) command, if CMake knows about abc, then the
>>path to abc is implicitly added to the link directories. This means
>>that, using a vxl example,
>>  LINK_DIRECTORIES( ${allvxl_BINARY_DIR}/vxl/vnl )
>>  LINK_LIBRARIES( vnl )
>>would simply become
>>  LINK_LIBRARIES( vnl )
>>
>>It has the added benefit of not hardcoding the location of libraries,
>>which means that LIBRARY_OUTPUT_PATH can be used effectively. For all
>>the libraries that CMake knows about, it will supply the appropriate
>>search directories.
>>
>>Any glaring problem that I don't see, especially with linking against
>>external libraries? Will this break anything in vtk/itk?
>>
>>Thanks,
>>Amitha.
>>
>>_______________________________________________
>>Cmake mailing list
>>Cmake at public.kitware.com
>>http://public.kitware.com/mailman/listinfo/cmake 
>
>
>_______________________________________________
>Cmake mailing list
>Cmake at public.kitware.com
>http://public.kitware.com/mailman/listinfo/cmake 





More information about the CMake mailing list