From f2ed9a3b42eb27cb4317e03a02fbd22a8d30984e Mon Sep 17 00:00:00 2001 From: Gerardo Ganis Date: Sat, 25 Feb 2023 13:31:00 +0100 Subject: [PATCH] Make sure libGaudiCoreSvc.so is found by genconf Fixies a dlopen failire on MacOsX. Setting LD_LIBRARY_PATH and similar does not work --- CMakeLists.txt | 2 ++ k4FWCore/CMakeLists.txt | 1 + test/k4FWCoreTest/CMakeLists.txt | 3 +-- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 61f43296..417c3feb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,6 +7,8 @@ find_package(ROOT COMPONENTS RIO Tree) #--------------------------------------------------------------- # Load macros and functions for Gaudi-based projects find_package(Gaudi) +get_filename_component(Gaudi_CMakeDir ${GAUDI_TOOLBOX_DIR} DIRECTORY) +get_filename_component(GAUDI_LIB_DIR ${Gaudi_CMakeDir} DIRECTORY) #--------------------------------------------------------------- include(GNUInstallDirs) diff --git a/k4FWCore/CMakeLists.txt b/k4FWCore/CMakeLists.txt index 3142ee14..9dc4d7fe 100644 --- a/k4FWCore/CMakeLists.txt +++ b/k4FWCore/CMakeLists.txt @@ -6,6 +6,7 @@ find_package(podio) gaudi_install(SCRIPTS) +file(COPY ${GAUDI_LIB_DIR}/libGaudiCoreSvc.so DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/) gaudi_add_library(k4FWCore SOURCES src/PodioDataSvc.cpp diff --git a/test/k4FWCoreTest/CMakeLists.txt b/test/k4FWCoreTest/CMakeLists.txt index d38d31b5..b620a278 100644 --- a/test/k4FWCoreTest/CMakeLists.txt +++ b/test/k4FWCoreTest/CMakeLists.txt @@ -4,8 +4,7 @@ find_package(EDM4HEP) - - +file(COPY ${GAUDI_LIB_DIR}/libGaudiCoreSvc.so DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/) file(GLOB k4fwcoretest_plugin_sources src/components/*.cpp) gaudi_add_module(k4FWCoreTestPlugins