Files
rocm-systems/cmake/Templates/setup-env.sh.in
T
Jonathan R. Madsen 1f0d06b6cb Correct the install locations of cmake config files (#55)
* Correct the install locations of cmake config files

The cmake config files should be installed in <Install_Prefix>/lib/cmake/<component_name>

* Apply suggestions from code review

* Correct the install locations of cmake config files

- ROCm standard for cmake config files is <install-prefix>/lib/cmake/<package-name>

---------

Co-authored-by: Ranjith Ramakrishnan <Ranjith.Ramakrishnan@amd.com>
2024-02-23 10:17:58 -06:00

24 lines
752 B
Bash

#!/usr/bin/env bash
BASEDIR=$(dirname ${BASH_SOURCE[0]})
command -v realpath &> /dev/null && BASEDIR=$(realpath ${BASEDIR}/../..) || BASEDIR=$(cd ${BASEDIR}/../.. && pwd)
if [ ! -d "${BASEDIR}" ]; then
echo "${BASEDIR} does not exist"
return 1
fi
@PROJECT_NAME_UNDERSCORED@_ROOT=${BASEDIR}
PATH=${BASEDIR}/bin:${PATH}
LD_LIBRARY_PATH=${BASEDIR}/@CMAKE_INSTALL_LIBDIR@:${LD_LIBRARY_PATH}
PYTHONPATH=${BASEDIR}/@CMAKE_INSTALL_PYTHONDIR@:${PYTHONPATH}
CMAKE_PREFIX_PATH=${BASEDIR}:${CMAKE_PREFIX_PATH}
@PROJECT_NAME_UNDERSCORED@_DIR=${BASEDIR}/@CMAKE_INSTALL_LIBDIR@/cmake/@PROJECT_NAME@
export @PROJECT_NAME_UNDERSCORED@_ROOT
export PATH
export LD_LIBRARY_PATH
export PYTHONPATH
export CMAKE_PREFIX_PATH
export @PROJECT_NAME_UNDERSCORED@_DIR