[cmake-developers] Finding versioned libraries

2012-02-15 Thread Rolf Eike Beer
Hi, as I found out today this construct doesn't work: find_library(MYLIB libfoo.so.2) This is because find_library will only try to access the whole path if the given name matches PREFIX.*SUFFIX, which is obviously not the case here. My simple approach on fixing this would be to also allow

Re: [cmake-developers] Finding versioned libraries

2012-02-15 Thread Eric Noulard
2012/2/15 Rolf Eike Beer e...@sf-mail.de: Hi, as I found out today this construct doesn't work: find_library(MYLIB libfoo.so.2) This is because find_library will only try to access the whole path if the given name matches PREFIX.*SUFFIX, which is obviously not the case here. My simple

Re: [cmake-developers] Finding versioned libraries

2012-02-15 Thread Rolf Eike Beer
2012/2/15 Rolf Eike Beer e...@sf-mail.de: Hi, as I found out today this construct doesn't work: find_library(MYLIB libfoo.so.2) This is because find_library will only try to access the whole path if the given name matches PREFIX.*SUFFIX, which is obviously not the case here. My simple

Re: [cmake-developers] Finding versioned libraries

2012-02-15 Thread Brad King
On 2/15/2012 9:18 AM, Eric Noulard wrote: If the user does not trust find_library for checking proper extension then: 1) He could modify/append CMAKE_FIND_LIBRARY_SUFFIXES in this case: list(APPEND CMAKE_FIND_LIBRARY_SUFFIXES .so.2) should work. 2) He could

Re: [cmake-developers] Finding versioned libraries

2012-02-15 Thread Eric Noulard
2012/2/15 Brad King brad.k...@kitware.com: On 2/15/2012 9:18 AM, Eric Noulard wrote: If the user does not trust find_library for checking proper extension then:    1) He could modify/append CMAKE_FIND_LIBRARY_SUFFIXES        in this case:           list(APPEND CMAKE_FIND_LIBRARY_SUFFIXES