From 76c3ea632c97f2e54130322ef1cb6a3a5e1582a1 Mon Sep 17 00:00:00 2001 From: jmcarcell Date: Mon, 12 Feb 2024 11:33:00 +0100 Subject: [PATCH 1/2] Change LCIO_LIBRARIES to LCIO::lcio --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index cdc150b..12c61ed 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -31,7 +31,7 @@ FIND_PACKAGE( GEAR REQUIRED ) # export Marlin_DEPENDS_INCLUDE_DIRS to MarlinConfig.cmake SET( Marlin_DEPENDS_INCLUDE_DIRS ${LCIO_INCLUDE_DIRS} ${GEAR_INCLUDE_DIRS} ${streamlog_INCLUDE_DIRS} ) SET( Marlin_DEPENDS_LIBRARY_DIRS ${LCIO_LIBRARY_DIRS} ${GEAR_LIBRARY_DIRS} ${streamlog_LIBRARY_DIRS} ) -SET( Marlin_DEPENDS_LIBRARIES ${LCIO_LIBRARIES} ${GEAR_LIBRARIES} ${streamlog_LIBRARIES} ) +SET( Marlin_DEPENDS_LIBRARIES LCIO::lcio ${GEAR_LIBRARIES} ${streamlog_LIBRARIES} ) INCLUDE_DIRECTORIES( SYSTEM ${Marlin_DEPENDS_INCLUDE_DIRS} ) From bebaa91925d53c43581619ee40db6f1e0c4a0baa Mon Sep 17 00:00:00 2001 From: tmadlener Date: Thu, 22 Aug 2024 10:50:25 +0200 Subject: [PATCH 2/2] Bootstrap the LCIO target in case it is not present --- CMakeLists.txt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 12c61ed..0643947 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -26,6 +26,15 @@ INCLUDE( ilcsoft_default_settings ) # required packages 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() FIND_PACKAGE( GEAR REQUIRED ) # export Marlin_DEPENDS_INCLUDE_DIRS to MarlinConfig.cmake