[CMake] cmake 2.2.0 --- problem with LINK_DIRECTORIES
Ken Martin
ken.martin at kitware.com
Fri Aug 26 10:56:42 EDT 2005
> Subject: [CMake] cmake 2.2.0 --- problem with LINK_DIRECTORIES
>
> Hi,
>
> I've just updated cmake to 2.2.0, and found
> LINK_DIRECTORIES(${CMAKE_INSTALL_PREFIX}/lib)
> in my CMakeLists.txt was ignored. Has anyone run into this problem? Any
> solution?
>
> Weiguang
There was an old behavior from CMake 1.2/1.4 where LINK_DIRECTORIES would
apply to targets listed BEFORE it in addition to AFTER it. The proper use is
that LINK_DIRECTORIES will apply to all targets that come after it. (this
makes a little more sense and provides a bit more flexibility) Hopefully
this is what you are seeing. Try putting the LINK_DIRECTORIES call before
your targets in your CMakeList file and see if that fixes it.
Thanks
Ken
More information about the CMake
mailing list