Skip to content

Commit

Permalink
configure a setup script in the install directory
Browse files Browse the repository at this point in the history
  • Loading branch information
paulgessinger committed Jul 3, 2024
1 parent e9e275a commit a79fb67
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ endif()

message(STATUS ${CMAKE_OSX_SYSROOT})

configure_file(${CMAKE_CURRENT_SOURCE_DIR}/setup.sh.in ${CMAKE_INSTALL_PREFIX}/setup.sh @ONLY)

# Determine current platform as minimum from SYSROOT
if(APPLE)
execute_process(COMMAND jq -r .MinimalDisplayName ${CMAKE_OSX_SYSROOT}/SDKSettings.json
Expand Down
22 changes: 22 additions & 0 deletions setup.sh.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash
set -e
set -u

function add_dep() {
pkg=$1
ver=$2
export CMAKE_PREFIX_PATH="@CMAKE_INSTALL_PREFIX@/$pkg/$ver:$CMAKE_PREFIX_PATH"
}

add_dep python @PYTHON_VERSION@
add_dep tbb @TBB_VERSION@
add_dep geant4 @GEANT4_VERSION@
add_dep hepmc3 @HEPMC3_VERSION@
add_dep pythia8 @PYTHIA8_VERSION@
add_dep nlohmann_json @JSON_VERSION@
add_dep root @ROOT_VERSION@
add_dep podio @PODIO_VERSION@
add_dep edm4hep @EDM4HEP_VERSION@
add_dep dd4hep @DD4HEP_VERSION@
add_dep boost @BOOST_VERSION@
add_dep eigen @EIGEN_VERSION@

0 comments on commit a79fb67

Please sign in to comment.