[CMake] find_library disobeying NO_DEFAULT_PATH?

Andrew Brownsword andrew.e.brownsword at gmail.com
Sat Apr 21 22:53:54 EDT 2018


I’m using this command:

find_library(LIBPQXX_LIBRARY
        NAMES libpqxx.a libpqxx
        PATHS ${LIBPQXX_DEPS_DIR}/src/src
        PATH_SUFFIXES .libs
        NO_DEFAULT_PATH)
message(STATUS "libpqxx @ " ${LIBPQXX_LIBRARY})

This prints a path to where an older version is installed in /usr/local/lib/.  My understanding is that NO_DEFAULT_PATH should limit the search to the supplied PATHS.  What am I doing wrong?



More information about the CMake mailing list