[CMake] Search path for find_path() and find_library()

Daniel Russel drussel at gmail.com
Thu Jan 3 19:23:50 EST 2013


I'm trying to use find_path() and find_library() to detect if a certain library is already in the system and, if not, build it myself. They find functions seem to find files that are located in CMAKE_INSTALL_PREFIX/lib etc (when CMAKE_INSTALL_PREFIX is a non-standard path). I'd kind of like to avoid this as, when it is a non-standard path, those files are most likely leftover from a previous build. However, none of the NO_X arguments seem disable this search, nor does (the hack of) setting CMAKE_INSTALL_PREFIX to a dummy value before calling find_path(). Is there some way to do this? Thanks.


More information about the CMake mailing list