From 3c23777fa5f4bcb201828dccf7569ae44ff8a609 Mon Sep 17 00:00:00 2001 From: tmadlener Date: Thu, 22 Aug 2024 11:36:11 +0200 Subject: [PATCH] Make sure that LCIO target is also available downstream --- cmake/MarlinConfig.cmake.in | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/cmake/MarlinConfig.cmake.in b/cmake/MarlinConfig.cmake.in index 5615c981..18148404 100644 --- a/cmake/MarlinConfig.cmake.in +++ b/cmake/MarlinConfig.cmake.in @@ -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