Skip to content
Snippets Groups Projects
Commit 2f1aef27 authored by Adrien Béraud's avatar Adrien Béraud
Browse files

msgpack: support more package names

parent 76089d09
Branches
Tags
No related merge requests found
...@@ -61,7 +61,13 @@ if (NOT MSVC) ...@@ -61,7 +61,13 @@ if (NOT MSVC)
pkg_search_module (Nettle REQUIRED IMPORTED_TARGET nettle) pkg_search_module (Nettle REQUIRED IMPORTED_TARGET nettle)
check_include_file_cxx(msgpack.hpp HAVE_MSGPACKCXX) check_include_file_cxx(msgpack.hpp HAVE_MSGPACKCXX)
if (NOT HAVE_MSGPACKCXX) if (NOT HAVE_MSGPACKCXX)
find_package (msgpack REQUIRED CONFIG NAMES msgpackc-cxx msgpack msgpack-cxx) find_package(msgpack QUIET CONFIG NAMES msgpack msgpackc-cxx)
if (NOT msgpack_FOUND)
find_package(msgpack REQUIRED CONFIG NAMES msgpack-cxx)
set(MSGPACK_TARGET "msgpack-cxx")
else()
set(MSGPACK_TARGET "msgpackc-cxx")
endif()
endif() endif()
if (OPENDHT_TOOLS) if (OPENDHT_TOOLS)
find_package (Readline 6 REQUIRED) find_package (Readline 6 REQUIRED)
...@@ -353,7 +359,7 @@ target_link_libraries(opendht ...@@ -353,7 +359,7 @@ target_link_libraries(opendht
${FMT_LIBRARY} ${FMT_LIBRARY}
) )
if (NOT HAVE_MSGPACKCXX) if (NOT HAVE_MSGPACKCXX)
target_link_libraries(opendht PUBLIC msgpackc-cxx) target_link_libraries(opendht PUBLIC MSGPACK_TARGET)
endif() endif()
if (Jsoncpp_FOUND) if (Jsoncpp_FOUND)
target_link_libraries(opendht PUBLIC PkgConfig::Jsoncpp) target_link_libraries(opendht PUBLIC PkgConfig::Jsoncpp)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment