From 5f1e7952a4903f91e50b55f0a1196089d49abe1b Mon Sep 17 00:00:00 2001 From: Adrien Beraud <adrien.beraud@savoirfairelinux.com> Date: Sat, 25 Mar 2023 18:26:47 -0400 Subject: [PATCH] Revert "more attempts to find msgpackc-cxx in a universal way" This reverts commit 965fbb43c7803dc2eb4ab86a4b459ecdbc461fb5. --- CMakeLists.txt | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f2e5714d..32812261 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -59,10 +59,7 @@ if (NOT MSVC) find_package (PkgConfig REQUIRED) pkg_search_module (GnuTLS REQUIRED IMPORTED_TARGET gnutls) pkg_search_module (Nettle REQUIRED IMPORTED_TARGET nettle) - check_include_file_cxx(msgpack.hpp HAVE_MSGPACKCXX) - if (NOT HAVE_MSGPACKCXX) - find_package (msgpack REQUIRED CONFIG) - endif() + find_package (msgpack REQUIRED NAMES msgpackc-cxx msgpack msgpack-cxx) if (OPENDHT_TOOLS) find_package (Readline 6 REQUIRED) endif () @@ -350,11 +347,9 @@ target_link_libraries(opendht PUBLIC ${CMAKE_THREAD_LIBS_INIT} PkgConfig::GnuTLS + msgpackc-cxx ${FMT_LIBRARY} ) -if (NOT HAVE_MSGPACKCXX) - target_link_libraries(opendht PUBLIC msgpackc-cxx) -endif() if (Jsoncpp_FOUND) target_link_libraries(opendht PUBLIC PkgConfig::Jsoncpp) endif() -- GitLab