cmake: Use find_package(Msgpack)'s version in pkg_search_module

Avoid duplicating information by using the Msgpack_FIND_VERSION variable
exported by find_package() inside FindMsgpack's pkg_search_module call.
This commit is contained in:
James McCoy 2016-02-05 21:23:19 -05:00
parent 79e7c03f91
commit 1d1574e0ac

View File

@ -7,7 +7,9 @@
if(NOT MSGPACK_USE_BUNDLED)
find_package(PkgConfig)
if (PKG_CONFIG_FOUND)
pkg_search_module(PC_MSGPACK QUIET msgpackc>=1.0 msgpack>=1.0)
pkg_search_module(PC_MSGPACK QUIET
msgpackc>=${Msgpack_FIND_VERSION}
msgpack>=${Msgpack_FIND_VERSION})
endif()
else()
set(PC_MSGPACK_INCLUDEDIR)