From 5b9e147e4916bf93ab9d0306fe5b3838d71bb16c Mon Sep 17 00:00:00 2001 From: KerstinKeller Date: Mon, 13 Nov 2023 21:17:54 +0100 Subject: [PATCH] CMake: Compatibility with new yaml-cpp release 0.8.0. (#1250) --- app/meas_cutter/CMakeLists.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/meas_cutter/CMakeLists.txt b/app/meas_cutter/CMakeLists.txt index 3869177616..159715b6e0 100644 --- a/app/meas_cutter/CMakeLists.txt +++ b/app/meas_cutter/CMakeLists.txt @@ -22,6 +22,12 @@ find_package(Threads REQUIRED) find_package(tclap REQUIRED) find_package(yaml-cpp REQUIRED) +#compatibility with yaml-cpp < 0.8.0 +if (NOT TARGET yaml-cpp::yaml-cpp AND TARGET yaml-cpp) + add_library(yaml-cpp::yaml-cpp ALIAS yaml-cpp) +endif() + + set(meas_cutter_src src/main.cpp src/utils.h @@ -49,7 +55,7 @@ ecal_add_app_console(${PROJECT_NAME} ${meas_cutter_src}) target_include_directories(${PROJECT_NAME} PRIVATE $) -target_link_libraries(${PROJECT_NAME} yaml-cpp +target_link_libraries(${PROJECT_NAME} yaml-cpp::yaml-cpp tclap::tclap eCAL::ecal-utils eCAL::hdf5