Skip to content
Snippets Groups Projects
Commit 65a090ff authored by Andre Sailer's avatar Andre Sailer Committed by Marko Petric
Browse files

Listcomponents: only DD4hepDIR for macOS

Also only TARGET_FILE_NAME instead of full
parent 7bb8e28a
No related branches found
No related tags found
No related merge requests found
......@@ -72,16 +72,17 @@ function(dd4hep_generate_rootmap library)
if(APPLE)
set(ENV_VAR DYLD_LIBRARY_PATH)
set(${ENV_VAR}_VALUE $<TARGET_FILE_DIR:${library}>:$<TARGET_FILE_DIR:DD4hep::DD4hepGaudiPluginMgr>)
else()
set(ENV_VAR LD_LIBRARY_PATH)
set(${ENV_VAR}_VALUE $<TARGET_FILE_DIR:${library}>:$<TARGET_FILE_DIR:DD4hep::DD4hepGaudiPluginMgr>:$ENV{${ENV_VAR}})
endif()
SET(ENV{${ENV_VAR}} $<TARGET_FILE_DIR:${library}>:$ENV{${ENV_VAR}}:$ENV{DD4HEP_LIBRARY_PATH} )
set(rootmapfile ${CMAKE_SHARED_MODULE_PREFIX}${library}.components)
add_custom_command(OUTPUT ${rootmapfile}
DEPENDS ${library}
COMMAND ${ENV_VAR}=$ENV{${ENV_VAR}} $<TARGET_FILE:DD4hep::listcomponents> -o ${rootmapfile} $<TARGET_FILE:${library}>
COMMAND ${ENV_VAR}=${ENV_VAR}_VALUE $<TARGET_FILE:DD4hep::listcomponents> -o ${rootmapfile} $<TARGET_FILE_NAME:${library}>
WORKING_DIRECTORY ${LIBRARY_OUTPUT_PATH}
)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment