[CMake] find_library setting search path order
Andreas Pakulat
apaku at gmx.de
Wed Jun 6 13:22:08 EDT 2012
Hi,
On Wed, Jun 6, 2012 at 5:40 PM, vivek goel <goelvivek2011 at gmail.com> wrote:
> I am using following command to find pcre library
>
> SET(CMAKE_LIBRARY_PATH "${CMAKE_SOURCE_DIR}/lib/linux/gcc/${BIT}/lib")
> All compiled library are located in
> ${CMAKE_SOURCE_DIR}/lib/linux/gcc/${BIT}/lib
>
> find_library(PCRE_LIBRARY
> pcre
> PATH
> ${CMAKE_SOURCE_DIR}/lib/linux/gcc/${BIT}/lib}
>
> But every-time it is searching at /usr/lib/x86_64-linux-gnu/libpcre.so.
> How can I change order for library search path ?
>
See the documentation for the function:
http://cmake.org/cmake/help/v2.8.8/cmake.html#command:find_library
As you can see 'PATH' is an unknown parameter for the function anyway. You
probably want to provide HINTS. The exact logic of finding the libraries is
explained there too.
Andreas
>
>
>
>
>
> regards
> Vivek Goel
>
>
> --
>
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20120606/1ed99bc4/attachment.htm>
More information about the CMake
mailing list