Jiri Daněk created DISPATCH-1321:
------------------------------------
Summary: Set rpath for qpid-proton (and other dependencies) when
they are found in nonstandard location
Key: DISPATCH-1321
URL: https://issues.apache.org/jira/browse/DISPATCH-1321
Project: Qpid Dispatch
Issue Type: Improvement
Affects Versions: 1.6.0
Reporter: Jiri Daněk
Currently, Dispatch has a {{config.sh}} helper script which must be sourced
when nonstandard installation prefix for dependencies is used, e.g. by
compiling Proton with {{-DCMAKE_INSTALL_PREFIX=}} and then letting Dispatch
find it by {{-DProton_DIR=}}. The script currently sets, among other things,
the {{PYTHONPATH}} and {{LD_LIBRARY_PATH}}
{code:java}
if [[ ! -f config.sh ]]; then
echo "You must source config.sh from within its own directory"
return
fi
export SOURCE_DIR=$(pwd)
export BUILD_DIR=$SOURCE_DIR/${1:-build}
export INSTALL_DIR=$SOURCE_DIR/${2:-install}
PYTHON_BIN=`type -P python || type -P python3`
PYTHON_LIB=$(${PYTHON_BIN} -c "from distutils.sysconfig import get_python_lib;
print(get_python_lib(prefix='$INSTALL_DIR'))")
export LD_LIBRARY_PATH=$INSTALL_DIR/lib64:$INSTALL_DIR/lib:$LD_LIBRARY_PATH
export PYTHONPATH=$PYTHON_LIB:$PYTHONPATH
export PATH=$INSTALL_DIR/sbin:$INSTALL_DIR/bin:$SOURCE_DIR/bin:$PATH{code}
I don't know if anything can be done about PYTHONPATH (I guess something can be
programmed in CMakeLists.txt, which knows where Proton is, and where Python
is), but there is easy fix for LD_LIBRARY_PATH, which is to set
{noformat}
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE){noformat}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]