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}")