cmake: msgpack: Check all lib names per directory

By default, find_library() searches all directories for one possible
name and then looks for the next name.  To make sure we're building
against the same headers and libraries, look for all names in a
directory before moving to the next one.
This commit is contained in:
James McCoy
2016-02-04 22:38:45 -05:00
parent 2be51f5e85
commit 79e7c03f91

View File

@@ -43,6 +43,9 @@ endif()
list(APPEND MSGPACK_NAMES msgpackc msgpack)
find_library(MSGPACK_LIBRARY NAMES ${MSGPACK_NAMES}
# Check each directory for all names to avoid using headers/libraries from
# different places.
NAMES_PER_DIR
HINTS ${PC_MSGPACK_LIBDIR} ${PC_MSGPACK_LIBRARY_DIRS}
${LIMIT_SEARCH})