Skip to content

Commit

Permalink
Change LCIO_LIBRARIES to LCIO::lcio (#56)
Browse files Browse the repository at this point in the history
* Change LCIO_LIBRARIES to LCIO::lcio

* Bootstrap the LCIO target in case it is not present

---------

Co-authored-by: jmcarcell <[email protected]>
Co-authored-by: tmadlener <[email protected]>
  • Loading branch information
3 people authored Aug 22, 2024
1 parent 2eb0c3d commit 2417c08
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 @@ -26,12 +26,21 @@ 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
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} )

Expand Down

0 comments on commit 2417c08

Please sign in to comment.