Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
iLCUtil
Manage
Activity
Members
Labels
Plan
Issues
3
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
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
iLCUtil
Merge requests
!32
add correct rpath settings (for macos)
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Imported
add correct rpath settings (for macos)
github/fork/gaede/fix_rpath
into
master
Overview
6
Commits
2
Pipelines
0
Changes
1
Merged
Imported
FU Chengdong
requested to merge
github/fork/gaede/fix_rpath
into
master
10 months ago
Overview
6
Commits
2
Pipelines
0
Changes
1
Expand
Created by: gaede
see (LCIO PR#121)
BEGINRELEASENOTES
replace
ilcsoft_default_rpath_settings.cmake
with the one from LCIO
see
https://github.com/iLCSoft/LCIO/pull/121
this fixes the rpath settings for all iLCSoft tools using this script to work on MacOS
(needed to install the key4hep stack on darwin)
ENDRELEASENOTES
0
0
Merge request reports
Compare
master
master (base)
and
latest version
latest version
bdf3d4cf
2 commits,
3 months ago
1 file
+
17
−
32
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
cmakemodules/ilcsoft_default_rpath_settings.cmake
+
17
−
32
Options
# rpath treatment for macos: always use rpath:
# ( maybe we should also use this on other platforms ?)
if
(
APPLE
)
# use, i.e. don't skip the full RPATH for the build tree
SET
(
CMAKE_SKIP_BUILD_RPATH FALSE
)
# when building, don't use the install RPATH already
# (but later on when installing)
SET
(
CMAKE_BUILD_WITH_INSTALL_RPATH FALSE
)
SET
(
CMAKE_INSTALL_RPATH
"
${
CMAKE_INSTALL_PREFIX
}
/lib"
)
# add the automatically determined parts of the RPATH
# which point to directories outside the build tree to the install RPATH
SET
(
CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE
)
# the RPATH to be used when installing, but only if it's not a system directory
LIST
(
FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES
"
${
CMAKE_INSTALL_PREFIX
}
/lib"
isSystemDir
)
IF
(
"
${
isSystemDir
}
"
STREQUAL
"-1"
)
SET
(
CMAKE_INSTALL_RPATH
"
${
CMAKE_INSTALL_PREFIX
}
/lib"
)
ENDIF
(
"
${
isSystemDir
}
"
STREQUAL
"-1"
)
#---RPATH options-------------------------------------------------------------------------------
# When building, don't use the install RPATH already (but later on when installing)
set
(
CMAKE_SKIP_BUILD_RPATH FALSE
)
# don't skip the full RPATH for the build tree
set
(
CMAKE_BUILD_WITH_INSTALL_RPATH FALSE
)
# use always the build RPATH for the build tree
set
(
CMAKE_MACOSX_RPATH TRUE
)
# use RPATH for MacOSX
set
(
CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE
)
# point to directories outside the build tree to the install RPATH
# Check whether to add RPATH to the installation (the build tree always has the RPATH enabled)
if
(
APPLE
)
set
(
CMAKE_INSTALL_NAME_DIR
"@rpath"
)
set
(
CMAKE_INSTALL_RPATH
"@loader_path/../
${
CMAKE_INSTALL_LIBDIR
}
"
)
# self relative LIBDIR
# the RPATH to be used when installing, but only if it's not a system directory
list
(
FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES
"
${
CMAKE_INSTALL_PREFIX
}
/
${
CMAKE_INSTALL_LIBDIR
}
"
isSystemDir
)
if
(
"
${
isSystemDir
}
"
STREQUAL
"-1"
)
set
(
CMAKE_INSTALL_RPATH
"@loader_path/../
${
CMAKE_INSTALL_LIBDIR
}
"
)
endif
(
"
${
isSystemDir
}
"
STREQUAL
"-1"
)
else
()
# add library install path to the rpath list
SET
(
CMAKE_INSTALL_RPATH
"
${
CMAKE_INSTALL_PREFIX
}
/lib"
)
MARK_AS_ADVANCED
(
CMAKE_INSTALL_RPATH
)
# append link pathes to rpath list
SET
(
CMAKE_INSTALL_RPATH_USE_LINK_PATH 1
)
MARK_AS_ADVANCED
(
CMAKE_INSTALL_RPATH_USE_LINK_PATH
)
set
(
CMAKE_SKIP_INSTALL_RPATH TRUE
)
# skip the full RPATH for the install tree
endif
()
Loading