Skip to content

Commit

Permalink
CMake: use the LCIO::lcio target instead of LCIO::LCIO
Browse files Browse the repository at this point in the history
LCIO now exports LCIO::lcio, so we could use that if LCIO is new enough
  • Loading branch information
andresailer committed Feb 16, 2024
1 parent b6f660a commit f06631d
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions DDEve/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ if(TARGET ROOT::ROOTEve)
SET(DDEVE_ROOT7_LINK ROOT::ROOTEve)
endif()

if(TARGET LCIO::LCIO)
if(TARGET LCIO::lcio)
SET(DDEVE_LCIO_SOURCES lcio/LCIOEventHandler.cpp)
SET(DDEVE_LCIO_LINK LCIO::LCIO)
SET(DDEVE_LCIO_LINK LCIO::lcio)
endif()

dd4hep_add_plugin(DDEvePlugins SOURCES src/*.cpp ${DDEVE_LCIO_SOURCES} ${DDEVE_ROOT7_SOURCES}
Expand Down
4 changes: 2 additions & 2 deletions DDG4/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,10 @@ endif()

#--------------------------- Plugin library for the simulation framework ---------
#--------------------------- LCIO Plugins for new simulation framework -----------
IF(TARGET LCIO::LCIO)
IF(TARGET LCIO::lcio)
dd4hep_add_plugin(DDG4LCIO
SOURCES lcio/*.cpp
USES DD4hep::DDG4 LCIO::LCIO
USES DD4hep::DDG4 LCIO::lcio
)
install(TARGETS DDG4LCIO EXPORT DD4hep LIBRARY DESTINATION lib)
set_target_properties(DDG4LCIO PROPERTIES VERSION ${DD4hep_VERSION} SOVERSION ${DD4hep_SOVERSION})
Expand Down
6 changes: 3 additions & 3 deletions UtilityApps/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ endif()
if(BUILD_TESTING)
if(DD4HEP_USE_LCIO)
add_executable(test_surfaces src/test_surfaces.cpp)
target_link_libraries(test_surfaces DD4hep::DDRec DD4hep::DDTest LCIO::LCIO)
target_link_libraries(test_surfaces DD4hep::DDRec DD4hep::DDTest LCIO::lcio)

add_executable(test_cellid_position_converter src/test_cellid_position_converter.cpp)
target_link_libraries(test_cellid_position_converter DD4hep::DDRec DD4hep::DDTest LCIO::LCIO)
target_link_libraries(test_cellid_position_converter DD4hep::DDRec DD4hep::DDTest LCIO::lcio)

LIST(APPEND OPTIONAL_EXECUTABLES test_surfaces)
LIST(APPEND OPTIONAL_EXECUTABLES test_cellid_position_converter)
Expand All @@ -76,7 +76,7 @@ if (DD4HEP_USE_LCIO)
USES DD4hep::DDCore ROOT::Geom
)
add_executable(teveLCIO G__eve1.cxx src/teve_display.cpp src/next_event_lcio.cpp)
target_link_libraries(teveLCIO DD4hep::DDRec LCIO::LCIO ROOT::Core ROOT::Eve ROOT::Gui ROOT::Graf3d ROOT::RGL)
target_link_libraries(teveLCIO DD4hep::DDRec LCIO::lcio ROOT::Core ROOT::Eve ROOT::Gui ROOT::Graf3d ROOT::RGL)
LIST(APPEND OPTIONAL_EXECUTABLES teveLCIO)
endif()

Expand Down
6 changes: 3 additions & 3 deletions cmake/DD4hepBuild.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -901,9 +901,9 @@ ENDMACRO()
# Create Interface library for LCIO
#
MACRO(DD4HEP_SETUP_LCIO_TARGETS)
IF(NOT TARGET LCIO::LCIO)
ADD_LIBRARY(LCIO::LCIO INTERFACE IMPORTED GLOBAL)
SET_TARGET_PROPERTIES(LCIO::LCIO
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}"
Expand Down

0 comments on commit f06631d

Please sign in to comment.