Get ROCr and ROCt dependencies using cmake targets
Instead of detecting files (header/library), use cmake's find_package to locate the required dependencies (hsa-runtime64 and hsakmt). Adding hsa-runtime64::hsa-runtime64 and hsakmt::hsakmt to the target_link_libraries also takes care of adding the interfaces include directories to the search path. Change-Id: I64eb77c97dac7982ac96d3158ad57df776cc0b53
This commit is contained in:
@@ -35,5 +35,5 @@ set ( LIB_SRC
|
||||
${LIB_DIR}/util/hsa_rsrc_factory.cpp
|
||||
)
|
||||
add_library ( ${TARGET_LIB} SHARED ${LIB_SRC} )
|
||||
target_include_directories ( ${TARGET_LIB} PRIVATE ${LIB_DIR} ${ROOT_DIR} ${HSA_RUNTIME_INC_PATH} ${HSA_KMT_LIB_PATH}/.. )
|
||||
target_link_libraries( ${TARGET_LIB} PRIVATE ${HSA_RUNTIME_LIB} c stdc++ )
|
||||
target_include_directories ( ${TARGET_LIB} PRIVATE ${LIB_DIR} ${ROOT_DIR} )
|
||||
target_link_libraries( ${TARGET_LIB} PRIVATE hsa-runtime64::hsa-runtime64 c stdc++ )
|
||||
|
||||
Reference in New Issue
Block a user