Am Dienstag, 27. Dezember 2011, 16:07:46 schrieb Hauke Heibel:
> Hi all,
> 
> I am wondering whether it is intended that the link_directories is
> appending the $(Configuration) sub-directory only to the last
> directory when a list of directories is passed to it?
> 
> I had to write something like
> 
>   foreach(link_dir ${LIBRARY_DIRS})
>     link_directories("${link_dir}")
>   endforeach()
> 
> to override the behaviour.
> 
> Any hint is welcome.

Don't use link_directories. Ever. You don't want to use it. Surely. It does 
not what you think it does. It only exists to create trouble, unexpected 
behaviour and questions to this list ;)

Pass the absolute path of the files you want to link to 
target_link_libraries(). Use the target name if you want to link against a 
library you have built in your project.

Eike

Attachment: signature.asc
Description: This is a digitally signed message part.

--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to