[CMake] find_library(): prioritize custom search path

Nico Schlömer nico.schloemer at gmail.com
Mon Dec 16 08:57:29 EST 2013


Hi all,

when using find_library(...), and two versions of libX are installed,
I would like to prioritize the one found it /my/custom/path/ over the
one in /usr/lib/. As explained in the find_library()'s help
<http://www.cmake.org/cmake/help/v2.8.12/cmake.html#command:find_library>,
putting that path in the HINTS field will still have CMake pick
/usr/lib/libX.{so,a}.
What's would be the correct way of prioritizing a provided path over
CMake's search defaults?

Cheers,
Nico


More information about the CMake mailing list