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

cmake: depend on 3.16, fallback on msgpack

Change-Id: I05e1170f7c39d711f3bdc9920d22965115d5f3a3
parent d50178b4
No related branches found
No related tags found
No related merge requests found
cmake_minimum_required(VERSION 3.22) cmake_minimum_required(VERSION 3.16)
project(dhtnet project(dhtnet
VERSION 0.0.1 VERSION 0.0.1
LANGUAGES CXX LANGUAGES CXX
...@@ -19,7 +19,11 @@ find_package(msgpackc-cxx QUIET CONFIG) ...@@ -19,7 +19,11 @@ find_package(msgpackc-cxx QUIET CONFIG)
if(msgpackc-cxx_FOUND) if(msgpackc-cxx_FOUND)
add_library(msgpack-cxx ALIAS msgpackc-cxx) add_library(msgpack-cxx ALIAS msgpackc-cxx)
else() else()
find_package(msgpack-cxx CONFIG REQUIRED) find_package(msgpack-cxx CONFIG)
if(NOT msgpack-cxx_FOUND)
find_package(msgpack CONFIG REQUIRED)
add_library(msgpack-cxx ALIAS msgpack)
endif()
endif() endif()
find_package(fmt) find_package(fmt)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment