amdsmi
amdsmi copied to clipboard
[cmake] Fix dependencies.
- 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).