Am Mittwoch 26 Oktober 2011, 15:33:36 schrieb Brad King: > On 10/26/2011 3:17 PM, Rolf Eike Beer wrote: > > Am Mittwoch 26 Oktober 2011, 15:14:22 schrieb Brad King:
> >> Note that this command is rarely necessary. Library locations > >> returned > >> by find_package() and find_library() are absolute paths. Pass these > >> absolute library file paths directly to the target_link_libraries() > >> command. CMake will ensure the linker finds them. > > > > I wouldn't object that either. Just wanting to get rid of this questions > > ;) > Please re-submit the patch with the above wording and using one of the > corrected methods described above. Attached. Eike
>From 2bb1131e9f01b1b395916a5ba62951f325e73fd0 Mon Sep 17 00:00:00 2001 From: Rolf Eike Beer <[email protected]> Date: Wed, 26 Oct 2011 20:43:21 +0200 Subject: [PATCH] Tell people that link_directories() is not what they are searching for Judging from the questions I see on the #cmake IRC channel this is one of the most common pitfalls for people coming from other build systems, especially plain Makefiles. Finally put this into the documentation to stop people getting fooled into using this. Text by Brad King. --- Source/cmLinkDirectoriesCommand.h | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/Source/cmLinkDirectoriesCommand.h b/Source/cmLinkDirectoriesCommand.h index e5ff4f0..aa13589 100644 --- a/Source/cmLinkDirectoriesCommand.h +++ b/Source/cmLinkDirectoriesCommand.h @@ -65,7 +65,12 @@ public: "For historical reasons, relative paths given to this command are " "passed to the linker unchanged " "(unlike many CMake commands which interpret them relative to the " - "current source directory)." + "current source directory).\n" + "Note that this command is rarely necessary. Library locations " + "returned by find_package() and find_library() are absolute paths. " + "Pass these absolute library file paths directly to the " + "target_link_libraries() command. CMake will ensure the linker finds " + "them." ; } -- 1.7.3.2
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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
