Skip to content
Snippets Groups Projects
Commit 0f9467d1 authored by Andre Sailer's avatar Andre Sailer
Browse files

PluginMgr: pass boost dependency on to MakeGaudiMap and dd4hep dependents

parent bcfda2b3
No related branches found
No related tags found
No related merge requests found
......@@ -18,7 +18,7 @@ target_compile_options(DD4hepGaudiPluginMgr PRIVATE -Wno-deprecated)
target_compile_options(DD4hepGaudiPluginMgr PRIVATE -Wno-keyword-macro)
target_compile_options(DD4hepGaudiPluginMgr PRIVATE -Wno-return-type-c-linkage)
target_link_libraries(DD4hepGaudiPluginMgr ${CMAKE_DL_LIBS} Boost::filesystem Boost::system)
target_link_libraries(DD4hepGaudiPluginMgr PUBLIC Boost::filesystem Boost::system ${CMAKE_DL_LIBS})
SET_TARGET_PROPERTIES(DD4hepGaudiPluginMgr PROPERTIES VERSION ${DD4hep_VERSION} SOVERSION ${DD4hep_SOVERSION})
if( NOT CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR )
......@@ -27,7 +27,8 @@ if( NOT CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR )
endif()
add_executable(listcomponents src/listcomponents.cpp )
target_link_libraries(listcomponents DD4hepGaudiPluginMgr ${CMAKE_DL_LIBS})
add_executable(DD4hep::listcomponents ALIAS listcomponents)
target_link_libraries(listcomponents PUBLIC DD4hepGaudiPluginMgr ${CMAKE_DL_LIBS})
target_compile_options(listcomponents PRIVATE -Wno-deprecated)
INSTALL(TARGETS listcomponents DD4hepGaudiPluginMgr EXPORT DD4hep
......
......@@ -97,23 +97,19 @@ function(dd4hep_generate_rootmap_notapple library)
set(libname ${CMAKE_SHARED_MODULE_PREFIX}${library}${CMAKE_SHARED_LIBRARY_SUFFIX})
#message(STATUS "DD4hep_DIR = ${DD4hep_DIR}" )
add_custom_command(TARGET ${library}
GET_TARGET_PROPERTY(boost_filesystem_loc Boost::filesystem IMPORTED_LOCATION)
GET_FILENAME_COMPONENT(boost_dir ${boost_filesystem_loc} DIRECTORY)
add_custom_command(OUTPUT ${rootmapfile}
DEPENDS ${library}
POST_BUILD
COMMAND ${CMAKE_COMMAND} -Dlibname=${libname} -Drootmapfile=${rootmapfile}
-Dgenmap_install_dir=${LIBRARY_OUTPUT_PATH}
-DROOT_VERSION=${ROOT_VERSION}
-DDD4hep_DIR=${DD4hep_DIR}
-DLD_PATH=${boost_dir}
-P ${DD4hep_DIR}/cmake/MakeGaudiMap.cmake)
#add_custom_command(OUTPUT ${rootmapfile}
# COMMAND ${CMAKE_COMMAND} -Dlibname=${libname} -Drootmapfile=${rootmapfile}
# -Dgenmap_install_dir=${LIBRARY_OUTPUT_PATH}
# -DROOT_VERSION=${ROOT_VERSION}
# -DDD4hep_DIR=${DD4hep_DIR}
# -P ${DD4hep_DIR}/cmake/MakeRootMap.cmake
# DEPENDS ${library})
##add_custom_target(${library}Rootmap ALL DEPENDS ${rootmapfile})
add_custom_target(Components_${library} ALL DEPENDS ${rootmapfile})
SET( install_destination "lib" )
if( CMAKE_INSTALL_LIBDIR )
SET( install_destination ${CMAKE_INSTALL_LIBDIR} )
......
......@@ -54,7 +54,7 @@ if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
endif()
FIND_PACKAGE(Boost REQUIRED)
FIND_PACKAGE(Boost REQUIRED COMPONENTS filesystem system)
SET_TARGET_PROPERTIES(Boost::boost
PROPERTIES
INTERFACE_COMPILE_DEFINITIONS BOOST_SPIRIT_USE_PHOENIX_V3
......
......@@ -2,7 +2,8 @@ message(STATUS " *** Gaudi listcomponents: Generate map for ${libname} ..." )
#
# Running listcomponents from Gaudi
#
FIND_PROGRAM( Gaudi_listcomponents_CMD listcomponents PATHS ${genmap_install_dir}/../bin ${DD4hep_DIR}/bin )
FIND_PROGRAM( Gaudi_listcomponents_CMD listcomponents PATHS ${genmap_install_dir}/../bin ${DD4hep_DIR}/bin
NO_DEFAULT_PATH NO_CMAKE_PATH)
###MESSAGE( STATUS " *** MakeRootMap ${genmap_install_dir}/../bin $ENV{DD4hep_DIR}/bin ${DD4hep_DIR}" )
MESSAGE( STATUS " *** MakeGaudiMap.cmake run command : ${Gaudi_listcomponents_CMD} -o ${rootmapfile} ${libname}
WORKING_DIRECTORY ${genmap_install_dir} "
......@@ -12,7 +13,6 @@ message(STATUS " *** Gaudi listcomponents: Generate map for ${libname} ..." )
##EXECUTE_PROCESS( COMMAND echo DYLD_LIBRARY_PATH = $ENV{DYLD_LIBRARY_PATH} )
else()
SET ( ENV{LD_LIBRARY_PATH} ${genmap_install_dir}:$ENV{LD_LIBRARY_PATH} )
#SET ( ENV{LD_PRELOAD} /lib64/libglapi.so )
endif()
# EXECUTE_PROCESS( COMMAND echo LD_LIBRARY_PATH = $ENV{LD_LIBRARY_PATH} )
EXECUTE_PROCESS( COMMAND
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment