[cmake] - Update search for LibElf (#256)

There is an issue with TheRock build currently. They have
a local source build of elfutils they want to use instead
of a system package. Currently, rocr uses it's own
FindLibElf.cmake module and this is inhibiting the build
from finding the libelf config built by TheRock.

Now we will first search in config mode and fallback to
module mode if nothing is found.

Authored-by: Ethan Stewart <ethan.stewart@amd.com>
Co-authored-by: systems-assistant[bot] <systems-assistant[bot]@users.noreply.github.com>
이 커밋은 다음에 포함됨:
systems-assistant[bot]
2025-08-13 09:13:45 -04:00
커밋한 사람 GitHub
부모 76fd78d394
커밋 d0a18e0eb9
+5
파일 보기
@@ -85,6 +85,11 @@ endif() # if (ROCM_CCACHE_BUILD)
find_package(PkgConfig)
find_package(LibElf REQUIRED)
find_package(LibElf CONFIG)
if(NOT LibElf_FOUND)
find_package(LibElf REQUIRED)
endif()
pkg_check_modules(drm REQUIRED IMPORTED_TARGET libdrm)
## Create the rocr target.