Skip to content
Snippets Groups Projects
Commit d4a2a146 authored by Attila Krasznahorkay's avatar Attila Krasznahorkay
Browse files

Merge branch 'XRootDFix-master-20201208' into 'master'

XRootD macOS Fix, master branch (2020.12.08.)

See merge request atlas/atlasexternals!788
parents c2f4d859 02cc38cb
No related branches found
Tags 2.0.92
No related merge requests found
......@@ -67,9 +67,18 @@ if( NOT "$ENV{LCG_SYSTEM_IGNORE_PATH}" STREQUAL "" )
unset( _ignorePath )
endif()
# Create the script that will sanitize xrootd-config after the build:
configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/cmake/sanitizeConfig.sh.in
${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/sanitizeConfig.sh @ONLY )
# Create the script that will sanitize xrootd-config after the build.
set( _sanitizeConfig FALSE )
find_program( SED_EXECUTABLE sed )
if( APPLE AND SED_EXECUTABLE )
configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/cmake/sanitizeConfig.macOS.sh.in
${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/sanitizeConfig.sh @ONLY )
set( _sanitizeConfig TRUE )
elseif( UNIX AND SED_EXECUTABLE )
configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/cmake/sanitizeConfig.unix.sh.in
${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/sanitizeConfig.sh @ONLY )
set( _sanitizeConfig TRUE )
endif()
# Files/directories generated by the build.
set( XROOTD_INCLUDE_DIR "${_buildDir}/include" )
......@@ -111,10 +120,17 @@ ExternalProject_Add_Step( XRootD forceconfigure
DEPENDERS configure
ALWAYS 1 )
ExternalProject_Add_Step( XRootD buildinstall
COMMAND ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/sanitizeConfig.sh
COMMAND ${CMAKE_COMMAND} -E copy_directory ${_buildDir}/ <INSTALL_DIR>
COMMENT "Installing XRootD into the build area"
DEPENDEES install )
if( _sanitizeConfig )
ExternalProject_Add_Step( XRootD sanitize
COMMAND
${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/sanitizeConfig.sh
COMMENT "Sanitizing the XRootD installation"
DEPENDEES install
DEPENDERS buildinstall )
endif()
add_dependencies( Package_XRootD XRootD )
if( ATLAS_BUILD_PYTHON )
add_dependencies( XRootD Python )
......
#!/bin/bash
#
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
#
# Script used to sanitize the xrootd-config script produced by the build,
# so that it would be relocatable.
#
# Create a sanitized copy using sed:
@SED_EXECUTABLE@ -i "" "s/^prefix=.*$/prefix=\${@CMAKE_PROJECT_NAME@_DIR}/" \
"@_buildDir@/@CMAKE_INSTALL_BINDIR@/xrootd-config"
#!/bin/bash
#
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
#
# Script used to sanitize the xrootd-config script produced by the build,
# so that it would be relocatable.
#
# Create a sanitized copy using sed:
sed -i"" "s/^prefix=.*$/prefix=\${@CMAKE_PROJECT_NAME@_DIR}/" \
"@_buildDir@/bin/xrootd-config"
@SED_EXECUTABLE@ -i "s/^prefix=.*$/prefix=\${@CMAKE_PROJECT_NAME@_DIR}/" \
"@_buildDir@/@CMAKE_INSTALL_BINDIR@/xrootd-config"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment