SWDEV-321112 - Use GNUInstallDirs

Use GNUInstallDirs variables to determine the location of LIBDIR, BINDIR, INCLUDEDIR, DOCDIR

Note that CMAKE_INSTALL_LIBDIR is overriden, since the default for RHEL
is lib64, but ROCm packaging wants it to be lib always. Distros or users
can easily override this.

Change-Id: I616152ccd2bc1f5a60bffa940312b38ca6e88c04
This commit is contained in:
Ranjith Ramakrishnan
2022-06-03 12:03:27 -07:00
parent 2b8d0ad70f
commit b72c464ac0
8 changed files with 33 additions and 32 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
# left-hand term originates from ENABLE_LDCONFIG = ON/OFF at package build
if [ "@ENABLE_LDCONFIG@" == "ON" ]; then
echo -e "@CPACK_PACKAGING_INSTALL_PREFIX@/lib\n@CPACK_PACKAGING_INSTALL_PREFIX@/lib64" > /etc/ld.so.conf.d/x86_64-librocm_smi_lib.conf
echo -e "@CPACK_PACKAGING_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@" > /etc/ld.so.conf.d/x86_64-librocm_smi_lib.conf
ldconfig
fi
+1 -1
View File
@@ -6,4 +6,4 @@ if [ $1 -le 1 ] && [ "@ENABLE_LDCONFIG@" == "ON" ]; then
fi
# remove pyc file generated by python
rm -rf @CPACK_PACKAGING_INSTALL_PREFIX@/libexec/rocm_smi/__pycache__
rm -rf @CPACK_PACKAGING_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBEXECDIR@/rocm_smi/__pycache__