Back to home page

sPhenix code displayed by LXR

 
 

    


Warning, /acts/cmake/setup_withdeps.sh.in is written in an unsupported language. File is not indexed.

0001 # This file is part of the Acts project.
0002 #
0003 # Copyright (C) 2024 CERN for the benefit of the Acts project
0004 #
0005 # This Source Code Form is subject to the terms of the Mozilla Public
0006 # License, v. 2.0. If a copy of the MPL was not distributed with this
0007 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
0008 
0009 # This script sets up the ACTS Examples environment in a somewhat robust way.
0010 
0011 if [ -n "$ZSH_VERSION" ]; then
0012     script_dir=${0:a:h}
0013 elif [ -n "$BASH_VERSION" ]; then
0014     script_dir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
0015 else
0016     # If the current shell is not ZSH or Bash, we can't guarantee that the
0017     # script will work, so we throw an error.
0018     echo "ERROR:   neither ZSH nor Bash was detected, other shells are not supported. The environment has not been modified."
0019     exit 1
0020 fi
0021 
0022 # source the python and ODD environment
0023 . $script_dir/python/setup.sh
0024 
0025 # set ACTS and ODD environment variables
0026 export ACTS_SOURCE_DIR=@CMAKE_CURRENT_SOURCE_DIR@
0027 export ODD_SOURCE_DIR=@CMAKE_CURRENT_SOURCE_DIR@/thirdparty/OpenDataDetector
0028 
0029 # make ACTS binaries available
0030 export PATH="$script_dir/bin:${PATH}"
0031 export LD_LIBRARY_PATH="$script_dir/lib:${LD_LIBRARY_PATH}"
0032 export DYLD_LIBRARY_PATH="$script_dir/lib:${DYLD_LIBRARY_PATH}"
0033 
0034 # activate dependencies if present
0035 if [[ -d "@ROOT_DIR@" ]]; then
0036   . @ROOT_BINDIR@/thisroot.sh
0037 fi
0038 if [[ -d "@Geant4_DIR@" ]]; then
0039   . @Geant4_INCLUDE_DIR@/../../bin/geant4.sh
0040 fi
0041 if [[ -d "@DD4hep_DIR@" ]]; then
0042   . @DD4hep_INCLUDE_DIRS@/../bin/thisdd4hep.sh
0043 fi
0044 if [[ -d "@podio_DIR@" ]]; then
0045   export LD_LIBRARY_PATH="@podio_LIBRARY_DIR@:${LD_LIBRARY_PATH}"
0046   export DYLD_LIBRARY_PATH="@podio_LIBRARY_DIR@:${DYLD_LIBRARY_PATH}"
0047   export ROOT_INCLUDE_PATH="@podio_INCLUDE_DIR@:${ROOT_INCLUDE_PATH}"
0048   export PYTHONPATH="@podio_PYTHON_DIR@:${PYTHONPATH}"
0049 fi
0050 if [[ -d "@EDM4HEP_DIR@" ]]; then
0051   export LD_LIBRARY_PATH="@EDM4HEP_LIBRARY_DIR@/lib:${LD_LIBRARY_PATH}"
0052   export DYLD_LIBRARY_PATH="@EDM4HEP_LIBRARY_DIR@/lib:${DYLD_LIBRARY_PATH}"
0053   export ROOT_INCLUDE_PATH="@EDM4HEP_INCLUDE_DIR@:${ROOT_INCLUDE_PATH}"
0054 fi