From b990a7671e31091c632d7c615a973380a0390abf Mon Sep 17 00:00:00 2001 From: Kent Russell Date: Fri, 17 Sep 2021 09:50:32 -0400 Subject: [PATCH] CMakeLists: Refer to libdrm-amdgpu1 for DEB This is required for Marketing Name, but Marketing Name isn't a hard requirement for ROCT, so make it a Suggested package for DEBs. Adding a commented-out possible solution for RPM-based distros, as unfortunately SLE <10 and CentOS/RHEL <8 don't know what "SUGGESTS" means. Potentially we will add a check that the build environment that determines if we require the REQUIRES field to be used. Hopefully we can work out the RPM side quickly, but for now enable SUGGESTS on DEB as a start Signed-off-by: Kent Russell Change-Id: Icea689a14c185964e7f47fb23ee432f9b35ccb03 [ROCm/ROCR-Runtime commit: f7e90798a08f71c97fd1ede6a7d9298580a3c955] --- projects/rocr-runtime/CMakeLists.txt | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/projects/rocr-runtime/CMakeLists.txt b/projects/rocr-runtime/CMakeLists.txt index 077ab51c36..db28804314 100644 --- a/projects/rocr-runtime/CMakeLists.txt +++ b/projects/rocr-runtime/CMakeLists.txt @@ -350,10 +350,23 @@ set(CPACK_PACKAGE_VERSION "${PACKAGE_VERSION_STR}") # Setting devel package dependendent version set(CPACK_DEBIAN_PACKAGE_DEPENDS "libdrm-dev, rocm-core") +set(CPACK_DEBIAN_PACKAGE_SUGGESTS "libdrm-amdgpu-amdgpu1") set(CPACK_DEBIAN_PACKAGE_REPLACES "hsakmt-roct") set(CPACK_RPM_PACKAGE_REQUIRES "libdrm-devel, rocm-core") +# TODO: Implement this effectively +# NOTE: CentOS/RHEL <8 and SUSE <10 have no concept of "Suggests" +# so a "suggests" field will just cause rpm installation to fail +# If the HSAKMT_REQUIRES_LIBDRM variable is true in the build +# environment, we use REQUIRES. Otherwise we use SUGGESTS +# For the distros above, this variable should be set to true +#if(DEFINED HSAKMT_REQUIRES_LIBDRM) +# string ( APPEND CPACK_RPM_PACKAGE_REQUIRES ", libdrm-amdgpu" ) +#else() +# set(CPACK_RPM_PACKAGE_SUGGESTS "libdrm-amdgpu" ) +#endif() + # Set the names now using CPACK utility set(CPACK_DEBIAN_FILE_NAME "DEB-DEFAULT") set(CPACK_RPM_FILE_NAME "RPM-DEFAULT")