amdsmi icon indicating copy to clipboard operation
amdsmi copied to clipboard

[cmake] Fix dependencies.

Open stellaraccident opened this issue 3 months ago • 0 comments

  • Use CMAKE_DL_LIBS instead of hard-coded dl.
  • Use Threads::Threads instead of pthread.
  • Find libdrm via pkgconfig (consistent to how other ROCm projects do it as documented here: https://github.com/ROCm/TheRock/blob/main/docs/development/dependencies.md#libdrm)
  • Discovers the SONAME of libdrm_amdgpu used to build (and that matches headers) and puts this in a new config header so that it can be used by dlopen instead of the generic "libdrm_amdgpu.so" (which could be anything and is only guaranteed available in some cases with dev packages installed).

stellaraccident avatar Sep 24 '25 21:09 stellaraccident