From 1f2582180ab9a55da17d061e063696c34d0fdd61 Mon Sep 17 00:00:00 2001 From: Dorian Eikenberg Date: Wed, 10 Jul 2024 15:44:26 +0200 Subject: [PATCH] Add boost headers Recent versions of boost-di require boost headers as a transitive dependency. Since those are included via FindPackage we need to override its default behavior so our target pulled in via FetchContent can be found instead of some system version. --- vmicore/src/CMakeLists.txt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/vmicore/src/CMakeLists.txt b/vmicore/src/CMakeLists.txt index 34b98af0..e8a10a19 100644 --- a/vmicore/src/CMakeLists.txt +++ b/vmicore/src/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.16) +cmake_minimum_required(VERSION 3.24) project(vmicore) include(CheckPIESupported) @@ -17,6 +17,13 @@ target_link_libraries(vmicore vmicore-lib) # Setup Boost DI +FetchContent_Declare( + Boost + GIT_REPOSITORY https://github.com/boostorg/headers + GIT_TAG master + OVERRIDE_FIND_PACKAGE +) + FetchContent_Declare( boost-di GIT_REPOSITORY https://github.com/boost-ext/di.git