Hi all,

I've just trigger a weird bug:

I work on a standard Linux OS.
I use a 3rd-party library which is installed in /usr/lib/foo.so.

When I try to link against it, "find_libray" correctly found it:
---
CMakeCache.txt:
FOO_LIBRARIES:INTERNAL=general;/usr/lib/foo.so
---

But the generated linker flags are wrong:
---
link.txt:
/usr/bin/c++   -g    CMakeFiles/bar.dir/main.cpp.o  -o bin/bar -rdynamic
-lfoo
---

In case the the linker will look for a /usr/lib/libfoo.so file, so the
build will fail.

I trigger this bug in both cmake 2.8.11.1 and 2.8.12.1

Note that, if foo.so is installed in /usr/local/lib/foo.so, then the bug is
not trigger since the generated linker command is:
---
link.txt
/usr/bin/c++   -g    CMakeFiles/bar.dir/main.cpp.o  -o bin/bar -rdynamic
/usr/local/lib/foo.so
---

Regards,


-- 
Samuel Martin
--

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

Reply via email to