Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make sure that LCIO target is also available downstream #59

Merged
merged 2 commits into from
Aug 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ 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_INCLUDE_DIRS ${GEAR_INCLUDE_DIRS} ${streamlog_INCLUDE_DIRS} )
SET( Marlin_DEPENDS_LIBRARY_DIRS ${GEAR_LIBRARY_DIRS} ${streamlog_LIBRARY_DIRS} )
SET( Marlin_DEPENDS_LIBRARIES LCIO::lcio ${GEAR_LIBRARIES} ${streamlog_LIBRARIES} )

INCLUDE_DIRECTORIES( SYSTEM ${Marlin_DEPENDS_INCLUDE_DIRS} )
Expand Down
13 changes: 13 additions & 0 deletions cmake/MarlinConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,19 @@ CHECK_PACKAGE_LIBS( Marlin Marlin MarlinXML )


# ---------- dependencies -----------------------------------------------------
include(CMakeFindDependencyMacro)
find_dependency(LCIO)
if(NOT TARGET LCIO::lcio)
message(STATUS "LCIO found without targets, bootstrapping them")
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()


INCLUDE( "@ILCSOFT_CMAKE_MODULES_ROOT@/MacroExportPackageDeps.cmake" )
# exports following package dependencies (if set)
# first argument of macro should be the package name
Expand Down
Loading