From 8ba976a100810055e12b412d951c47b5b61e3d15 Mon Sep 17 00:00:00 2001 From: Andre Sailer Date: Wed, 14 Feb 2024 17:08:00 +0100 Subject: [PATCH] CMake: add shim for LCIO::lcio --- CMakeLists.txt | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d467551ae..a8f65059d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -52,7 +52,16 @@ message ( STATUS "ROOT_VERSION: ${ROOT_VERSION}" ) find_package( Geant4 REQUIRED ) find_package( LCIO REQUIRED) - +# Shim for older LCIO versions +if(NOT TARGET LCIO::lcio) + add_library(LCIO::lcio INTERFACE IMPORTED GLOBAL) + set_target_properties(LCIO::lcio + PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${LCIO_INCLUDE_DIRS}" + INTERFACE_LINK_LIBRARIES "${LCIO_LIBRARIES}" + ) + endif() + add_subdirectory(detectorSegmentations) add_subdirectory(detectorCommon)