Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
DD4hep
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cepc
externals
mirroring
DD4hep
Commits
24165f99
Commit
24165f99
authored
5 years ago
by
Andre Sailer
Committed by
Marko Petric
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
MakeGaudiMap: use target properties to get the necessary command and library locations
parent
a13ebd0e
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
cmake/DD4hep.cmake
+4
-8
4 additions, 8 deletions
cmake/DD4hep.cmake
cmake/MakeGaudiMap.cmake
+8
-11
8 additions, 11 deletions
cmake/MakeGaudiMap.cmake
with
12 additions
and
19 deletions
cmake/DD4hep.cmake
+
4
−
8
View file @
24165f99
...
...
@@ -86,17 +86,14 @@ function(dd4hep_generate_rootmap_notapple library)
if
(
NOT DD4hep_DIR
)
SET
(
DD4hep_DIR
${
CMAKE_SOURCE_DIR
}
)
endif
()
find_package
(
ROOT QUIET
)
set
(
rootmapfile
${
CMAKE_SHARED_MODULE_PREFIX
}${
library
}
.components
)
set
(
libname
${
CMAKE_SHARED_MODULE_PREFIX
}${
library
}${
CMAKE_SHARED_LIBRARY_SUFFIX
}
)
add_custom_command
(
OUTPUT
${
rootmapfile
}
DEPENDS
${
library
}
POST_BUILD
COMMAND
${
CMAKE_COMMAND
}
-Dlibname=
$
{
libname
}
-Drootmapfile=
${
rootmapfile
}
-D
genmap_install_dir=
${
LIBRARY_OUTPUT_PATH
}
-D
ROOT_VERSION=
${
ROOT_VERSION
}
COMMAND
${
CMAKE_COMMAND
}
-Dlibname=$
<TARGET_FILE_NAME:
${
library
}
>
-Drootmapfile=
${
rootmapfile
}
-D
DD4HEP_LISTCOMPONENTS_CMD=$<TARGET_FILE:DD4hep::listcomponents>
-D
LIBRARY_LOCATION=$<TARGET_FILE_DIR:
${
library
}
>
-DDD4hep_DIR=
${
DD4hep_DIR
}
-P
${
DD4hep_DIR
}
/cmake/MakeGaudiMap.cmake
)
add_custom_target
(
Components_
${
library
}
ALL DEPENDS
${
rootmapfile
}
)
...
...
@@ -104,8 +101,7 @@ function(dd4hep_generate_rootmap_notapple library)
if
(
CMAKE_INSTALL_LIBDIR
)
SET
(
install_destination
${
CMAKE_INSTALL_LIBDIR
}
)
endif
()
install
(
FILES
${
LIBRARY_OUTPUT_PATH
}
/
${
rootmapfile
}
install
(
FILES $<TARGET_FILE_DIR:
${
library
}
>/
${
rootmapfile
}
DESTINATION
${
install_destination
}
)
endfunction
()
...
...
This diff is collapsed.
Click to expand it.
cmake/MakeGaudiMap.cmake
+
8
−
11
View file @
24165f99
message
(
STATUS
" *** Gaudi listcomponents: Generate map for
${
libname
}
..."
)
#
# Running listcomponents from DD4hep
#
FIND_PROGRAM
(
Gaudi_listcomponents_CMD listcomponents PATHS
${
genmap_install_dir
}
/../bin
${
DD4hep_DIR
}
/bin
NO_DEFAULT_PATH NO_CMAKE_PATH
)
GET_FILENAME_COMPONENT
(
GAUDI_LISTCOMP_INSTALL
${
Gaudi_listcomponents_CMD
}
DIRECTORY
)
###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
}
"
#
MESSAGE
(
STATUS
" *** MakeGaudiMap.cmake run command :
${
DD4HEP_LISTCOMPONENTS_CMD
}
-o
${
rootmapfile
}
${
libname
}
WORKING_DIRECTORY
${
LIBRARY_LOCATION
}
"
)
GET_FILENAME_COMPONENT
(
GAUDI_LISTCOMP_INSTALL
${
DD4HEP_LISTCOMPONENTS_CMD
}
DIRECTORY
)
if
(
APPLE
)
SET
(
ENV{DYLD_LIBRARY_PATH}
${
genmap_install_dir
}
:$ENV{DYLD_LIBRARY_PATH}:$ENV{DD4HEP_LIBRARY_PATH}
)
SET
(
ENV{DYLD_LIBRARY_PATH}
${
LIBRARY_LOCATION
}
:$ENV{DYLD_LIBRARY_PATH}:$ENV{DD4HEP_LIBRARY_PATH}
)
##EXECUTE_PROCESS( COMMAND echo DYLD_LIBRARY_PATH = $ENV{DYLD_LIBRARY_PATH} )
else
()
SET
(
ENV{LD_LIBRARY_PATH}
${
GAUDI_LISTCOMP_INSTALL
}
/../lib:
${
genmap_install_dir
}
:$ENV{LD_LIBRARY_PATH}
)
SET
(
ENV{LD_LIBRARY_PATH}
${
LIBRARY_LOCATION
}
:
${
GAUDI_LISTCOMP_INSTALL
}
:$ENV{LD_LIBRARY_PATH}
)
endif
()
# EXECUTE_PROCESS( COMMAND echo LD_LIBRARY_PATH = $ENV{LD_LIBRARY_PATH} )
EXECUTE_PROCESS
(
COMMAND
${
Gaudi_listcomponents
_CMD
}
-o
${
rootmapfile
}
${
libname
}
WORKING_DIRECTORY
${
genmap_install_dir
}
${
DD4HEP_LISTCOMPONENTS
_CMD
}
-o
${
rootmapfile
}
${
libname
}
WORKING_DIRECTORY
${
LIBRARY_LOCATION
}
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment