Skip to content

Commit

Permalink
[CMake] yaml-cpp compatibility with CMake < 3.18 (#1323)
Browse files Browse the repository at this point in the history
  • Loading branch information
DownerCase authored and FlorianReimold committed Jan 26, 2024
1 parent bb572fa commit 30fed46
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#
# ========================= eCAL LICENSE =================================

cmake_minimum_required(VERSION 3.13)
cmake_minimum_required(VERSION 3.15)

include(CMakeDependentOption)

Expand Down
4 changes: 3 additions & 1 deletion app/meas_cutter/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ 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)
# ALIASing a imported non-global library requires CMake 3.18 so we do this
add_library(yaml-cpp::yaml-cpp INTERFACE IMPORTED)
target_link_libraries(yaml-cpp::yaml-cpp INTERFACE yaml-cpp)
endif()


Expand Down

0 comments on commit 30fed46

Please sign in to comment.