Skip to content

Commit

Permalink
CMake: add shim for LCIO::lcio
Browse files Browse the repository at this point in the history
  • Loading branch information
andresailer committed Feb 14, 2024
1 parent f6c1762 commit 8ba976a
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 8ba976a

Please sign in to comment.