diff --git a/DDG4/examples/initAClick.C b/DDG4/examples/initAClick.C index 03a044dd976beda1409c834695465d598d18bb02..b0a51fd045631092b7f3503f95fbeda00a464c59 100644 --- a/DDG4/examples/initAClick.C +++ b/DDG4/examples/initAClick.C @@ -63,7 +63,7 @@ int initAClick(const char* command=0) { std::string defs = ""; std::string libs = " -L"+rootsys+"/lib"; std::string inc = " -I"+dd4hep+"/examples/DDG4/examples -I"+dd4hep + " -I"+dd4hep+"/include"; - libs += " -L"+dd4hep+"/lib -lDDCore -lDDG4"; + libs += " -L"+dd4hep+"/lib -lDD4hepGaudiPluginMgr -lDDCore -lDDG4"; if ( !geant4.empty() ) { inc += " -I"+geant4+"/include/Geant4"; #ifdef __APPLE__ @@ -83,6 +83,7 @@ int initAClick(const char* command=0) { #ifndef __APPLE__ libs += " -lCore -lMathCore -pthread -lm -ldl -rdynamic"; #endif + gSystem->Load("libDD4hepGaudiPluginMgr"); gSystem->AddIncludePath(inc.c_str()); gSystem->AddLinkedLibs(libs.c_str()); std::cout << "+++ Includes: " << gSystem->GetIncludePath() << std::endl; diff --git a/cmake/DD4hepBuild.cmake b/cmake/DD4hepBuild.cmake index df95cccd76cf49b0397798156a63f6ee1dd46ff4..b91e8e3b52777701e8e04cece2c55ef4d48c576d 100644 --- a/cmake/DD4hepBuild.cmake +++ b/cmake/DD4hepBuild.cmake @@ -1461,9 +1461,13 @@ endfunction() # #--------------------------------------------------------------------------------------------------- function ( fill_dd4hep_library_path ) - string(REGEX REPLACE "/lib/libCore.*" "" ROOT_ROOT ${ROOT_Core_LIBRARY}) - SET( ENV{DD4HEP_LIBRARY_PATH} ${ROOT_ROOT}/lib:${Boost_LIBRARY_DIRS} ) + SET( ENV{DD4HEP_LIBRARY_PATH} ${ROOT_ROOT}/lib ) + if ( NOT "${Boost_LIBRARY_DIRS}" STREQUAL "" ) + SET( ENV{DD4HEP_LIBRARY_PATH} $ENV{DD4HEP_LIBRARY_PATH}:${Boost_LIBRARY_DIRS} ) + else() + dd4hep_print("|++> The boost library path cannot be determined. Problems maybe ahead.") + endif() if ( ${DD4HEP_USE_GEANT4} ) string(REGEX REPLACE "/lib/Geant4.*" "" Geant4_ROOT ${Geant4_DIR}) SET( ENV{DD4HEP_LIBRARY_PATH} ${Geant4_ROOT}/lib:$ENV{DD4HEP_LIBRARY_PATH} ) @@ -1480,6 +1484,4 @@ function ( fill_dd4hep_library_path ) endif() SET( ENV{DD4HEP_LIBRARY_PATH} ${CMAKE_BINARY_DIR}/lib:$ENV{DD4HEP_LIBRARY_PATH} ) - - endfunction() diff --git a/cmake/MakeGaudiMap.cmake b/cmake/MakeGaudiMap.cmake index 47ef97ce896fa242988875a30df17585854a3851..30cfd7fd752e3fb6b40c73d5abae9129ee6449f3 100644 --- a/cmake/MakeGaudiMap.cmake +++ b/cmake/MakeGaudiMap.cmake @@ -9,8 +9,9 @@ message(STATUS " *** Gaudi listcomponents: Generate map for ${libname} ..." ) ) if(APPLE) - SET ( ENV{DYLD_LIBRARY_PATH} ${genmap_install_dir}:$ENV{DYLD_LIBRARY_PATH}:$ENV{DD4HEP_LIBRARY_PATH} ) + SET ( ENV{DYLD_LIBRARY_PATH} ${genmap_install_dir}:$ENV{DYLD_LIBRARY_PATH}:$ENV{DD4HEP_LIBRARY_PATH}:${Boost_LIBRARY_DIRS} ) EXECUTE_PROCESS( COMMAND echo DYLD_LIBRARY_PATH = $ENV{DYLD_LIBRARY_PATH} ) + EXECUTE_PROCESS( COMMAND echo Boost_LIBRARY_DIRS = ${Boost_LIBRARY_DIRS} ) else() SET ( ENV{LD_LIBRARY_PATH} ${genmap_install_dir}:$ENV{LD_LIBRARY_PATH} ) #SET ( ENV{LD_PRELOAD} /lib64/libglapi.so ) diff --git a/examples/LHeD/scripts/initAClick.C b/examples/LHeD/scripts/initAClick.C index 34f9572064513e244f0e5ab56ff90e8ad57adbe3..8f155ade57514d0bdde5f8fd40a1e5b374f0ae72 100644 --- a/examples/LHeD/scripts/initAClick.C +++ b/examples/LHeD/scripts/initAClick.C @@ -63,7 +63,7 @@ int initAClick(const char* command=0) { std::string defs = ""; std::string libs = " -L"+rootsys+"/lib"; std::string inc = " -I"+dd4hep+"/examples/LHeD/scripts -I"+dd4hep + " -I"+dd4hep+"/include"+clhep+"/include -I"+geant4+"/include"; - libs += " -L"+dd4hep+"/lib -lDDCore -lDDG4"; + libs += " -L"+dd4hep+"/lib -lDD4hepGaudiPluginMgr -lDDCore -lDDG4"; if ( !geant4.empty() ) { inc += " -I"+geant4+"/include/Geant4"; #ifdef __APPLE__ @@ -83,6 +83,7 @@ int initAClick(const char* command=0) { #ifndef __APPLE__ libs += " -lCore -lMathCore -pthread -lm -ldl -rdynamic"; #endif + gSystem->Load("libDD4hepGaudiPluginMgr"); gSystem->AddIncludePath(inc.c_str()); gSystem->AddLinkedLibs(libs.c_str()); std::cout << "+++ Includes: " << gSystem->GetIncludePath() << std::endl;