From e8aef983bd6f45549a8558e4116592833f7e2789 Mon Sep 17 00:00:00 2001 From: Frank Gaede <frank.gaede@desy.de> Date: Tue, 10 Sep 2013 13:54:34 +0000 Subject: [PATCH] - use the same method to generate rootmap files also on MacOS -> requires all dynamic libraries to be on the search path ... --- cmake/DD4hep.cmake | 71 +++++++++++++++++++++++++--------------------- 1 file changed, 38 insertions(+), 33 deletions(-) diff --git a/cmake/DD4hep.cmake b/cmake/DD4hep.cmake index c5bf6644f..13136a489 100644 --- a/cmake/DD4hep.cmake +++ b/cmake/DD4hep.cmake @@ -30,44 +30,49 @@ endfunction() # -#FG: the following function works nicely on MacOS - for dd4hep and examples -# but not on SL or Ubuntu ... # function(dd4hep_generate_rootmap_apple library) - find_package(ROOT QUIET) - find_package(DD4hep QUIET) - - set(rootmapfile ${CMAKE_SHARED_MODULE_PREFIX}${library}.rootmap) - - set(libname ${CMAKE_SHARED_MODULE_PREFIX}${library}${CMAKE_SHARED_LIBRARY_SUFFIX}) - - -#--------------------------------------------------------------------------------------- -if( DD4hep_FOUND ) - # we are building an external tool and need to source ${DD4hep_ROOT}/bin/thisdd4hep.sh - - add_custom_command(OUTPUT ${rootmapfile} - COMMAND cd ${LIBRARY_OUTPUT_PATH} && - . ${DD4hep_ROOT}/bin/thisdd4hep.sh && - genmap ${ROOT_genmap_CMD} -i ${libname} -o ${rootmapfile} - DEPENDS ${library}) - -else() # we are building DD4hep itself - only need thisroot.sh - - add_custom_command(OUTPUT ${rootmapfile} - COMMAND cd ${LIBRARY_OUTPUT_PATH} && - . ${ROOT_ROOT}/bin/thisroot.sh && - genmap ${ROOT_genmap_CMD} -i ${libname} -o ${rootmapfile} - DEPENDS ${library}) -endif() +# for now do the same for apple that is done for the rest +dd4hep_generate_rootmap( ${library} ) -add_custom_target(${library}Rootmap ALL DEPENDS ${rootmapfile}) +#FG: the following function works nicely on MacOS - for dd4hep and examples +# but not on SL or Ubuntu ... -install(FILES ${LIBRARY_OUTPUT_PATH}/${rootmapfile} - DESTINATION lib - ) -#-------------------------------------------------------------------------------------- +# find_package(ROOT QUIET) +# find_package(DD4hep QUIET) +# +# set(rootmapfile ${CMAKE_SHARED_MODULE_PREFIX}${library}.rootmap) +# +# set(libname ${CMAKE_SHARED_MODULE_PREFIX}${library}${CMAKE_SHARED_LIBRARY_SUFFIX}) +# +# +##--------------------------------------------------------------------------------------- +#if( DD4hep_FOUND ) +# # we are building an external tool and need to source ${DD4hep_ROOT}/bin/thisdd4hep.sh +# +# add_custom_command(OUTPUT ${rootmapfile} +# COMMAND cd ${LIBRARY_OUTPUT_PATH} && +# . ${DD4hep_ROOT}/bin/thisdd4hep.sh && +# genmap ${ROOT_genmap_CMD} -i ${libname} -o ${rootmapfile} +# DEPENDS ${library}) +# +#else() # we are building DD4hep itself - only need thisroot.sh +# +# add_custom_command(OUTPUT ${rootmapfile} +# COMMAND cd ${LIBRARY_OUTPUT_PATH} && +# . ${ROOT_ROOT}/bin/thisroot.sh && +# genmap ${ROOT_genmap_CMD} -i ${libname} -o ${rootmapfile} +# DEPENDS ${library}) +#endif() +# +# +#add_custom_target(${library}Rootmap ALL DEPENDS ${rootmapfile}) +# +#install(FILES ${LIBRARY_OUTPUT_PATH}/${rootmapfile} +# DESTINATION lib +# ) +##-------------------------------------------------------------------------------------- endfunction() -- GitLab