From 29602fec525c5263f68769b50ce6360207f72a20 Mon Sep 17 00:00:00 2001 From: Afzal Patel Date: Thu, 1 May 2025 10:02:02 -0700 Subject: [PATCH] add interface drm include directory add interface drm include directory [ROCm/rocm_smi_lib commit: f3c6e80fab693a1e1757eaab7b7d38ee521521a7] --- projects/rocm-smi-lib/CMakeLists.txt | 2 ++ projects/rocm-smi-lib/rocm_smi/CMakeLists.txt | 2 ++ 2 files changed, 4 insertions(+) diff --git a/projects/rocm-smi-lib/CMakeLists.txt b/projects/rocm-smi-lib/CMakeLists.txt index 769481adf4..e389134902 100755 --- a/projects/rocm-smi-lib/CMakeLists.txt +++ b/projects/rocm-smi-lib/CMakeLists.txt @@ -41,6 +41,8 @@ set(SHARE_INSTALL_PREFIX # provide git to utilities find_program (GIT NAMES git) +# sets DRM_INCLUDE_DIRS +pkg_check_modules(DRM REQUIRED libdrm) ## Setup the package version based on git tags. set(PKG_VERSION_GIT_TAG_PREFIX "rsmi_pkg_ver") diff --git a/projects/rocm-smi-lib/rocm_smi/CMakeLists.txt b/projects/rocm-smi-lib/rocm_smi/CMakeLists.txt index 445c4f6ccd..5b837a2630 100755 --- a/projects/rocm-smi-lib/rocm_smi/CMakeLists.txt +++ b/projects/rocm-smi-lib/rocm_smi/CMakeLists.txt @@ -92,6 +92,8 @@ target_include_directories(${ROCM_SMI_TARGET} "$" ) +target_include_directories(${ROCM_SMI_TARGET} INTERFACE ${DRM_INCLUDE_DIRS}) + ## Set the VERSION and SOVERSION values set_property(TARGET ${ROCM_SMI_TARGET} PROPERTY SOVERSION "${VERSION_MAJOR}")