From 727cc9ccd35b615928898ae7ee6370383bcca992 Mon Sep 17 00:00:00 2001 From: Sean Keely Date: Fri, 12 Jun 2020 15:55:49 -0500 Subject: [PATCH] Install LibElf config module. libelf does not natively support cmake packages and is not located by cmake's default system library modules. Change-Id: I4e7cda32615febf9f45ccc15f4e2a3f3505804bb --- runtime/hsa-runtime/CMakeLists.txt | 5 +++++ runtime/hsa-runtime/hsa-runtime64-config.cmake.in | 1 + 2 files changed, 6 insertions(+) diff --git a/runtime/hsa-runtime/CMakeLists.txt b/runtime/hsa-runtime/CMakeLists.txt index 9749261515..6bae6cfe5f 100644 --- a/runtime/hsa-runtime/CMakeLists.txt +++ b/runtime/hsa-runtime/CMakeLists.txt @@ -309,6 +309,11 @@ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${CORE_RUNTIME_TARGET}-config.cmake ${ DESTINATION lib/cmake/${CORE_RUNTIME_TARGET} COMPONENT dev) +# Install the libelf find module +install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules/FindLibElf.cmake ${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules/COPYING-CMAKE-SCRIPTS + DESTINATION lib/cmake/${CORE_RUNTIME_TARGET} + COMPONENT dev) + # Optionally record the package's find module in the user's package cache. if ( NOT DEFINED EXPORT_TO_USER_PACKAGE_REGISTRY ) set ( EXPORT_TO_USER_PACKAGE_REGISTRY "off" ) diff --git a/runtime/hsa-runtime/hsa-runtime64-config.cmake.in b/runtime/hsa-runtime/hsa-runtime64-config.cmake.in index 0014f953f2..b38b8d0f12 100644 --- a/runtime/hsa-runtime/hsa-runtime64-config.cmake.in +++ b/runtime/hsa-runtime/hsa-runtime64-config.cmake.in @@ -45,5 +45,6 @@ include( CMakeFindDependencyMacro ) find_dependency(hsakmt 1.0) +find_dependency(elf::elf) include( "${CMAKE_CURRENT_LIST_DIR}/@CORE_RUNTIME_TARGET@Targets.cmake" )