Find rocdecode - Updates for ROCm 7.0 (#610)

* rocDecode - Version 1.0.0

* Find package - config updates

* CMakeLists - Updates and config fix

* CMakelists - updates

* Samples - link to rocdecode_LIBRARY rocdecode::rocdecode

---------

Co-authored-by: Kiriti <kiriti@santiago.amd.com>

[ROCm/rocdecode commit: 23c17cc150]
This commit is contained in:
Kiriti Gowda
2025-06-24 14:39:49 -07:00
کامیت شده توسط GitHub
والد 72b5c717e1
کامیت 208f918c88
17فایلهای تغییر یافته به همراه216 افزوده شده و 194 حذف شده
@@ -57,22 +57,25 @@ include(CTest)
# add ROCm find Config location
list(APPEND CMAKE_PREFIX_PATH ${ROCM_PATH}/lib/cmake)
# find rocDecode
find_package(ROCDECODE QUIET)
if(ROCDECODE_FOUND)
message("-- ${White}${PROJECT_NAME}: rocDecode found with find_package(ROCDECODE QUIET)${ColourReset}")
message("-- \t${White}ROCDECODE_INCLUDE_DIR -- ${ROCDECODE_INCLUDE_DIR}${ColourReset}")
message("-- \t${White}ROCDECODE_LIB_DIR -- ${ROCDECODE_LIB_DIR}${ColourReset}")
message("-- \t${White}ROCDECODE_LIBRARY -- ${ROCDECODE_LIBRARY}${ColourReset}")
message("-- \t${White}ROCDECODE_FOUND -- ${ROCDECODE_FOUND}${ColourReset}")
message("-- \t${White}ROCDECODE_VERSION -- ${ROCDECODE_VERSION}${ColourReset}")
message("-- \t${White}ROCDECODE_VERSION_MAJOR -- ${ROCDECODE_VERSION_MAJOR}${ColourReset}")
message("-- \t${White}ROCDECODE_VERSION_MINOR -- ${ROCDECODE_VERSION_MINOR}${ColourReset}")
message("-- \t${White}ROCDECODE_VERSION_PATCH -- ${ROCDECODE_VERSION_PATCH}${ColourReset}")
# find rocdecode
if(BUILD_FROM_SOURCE)
message("-- ${White}${PROJECT_NAME}: CTests requires rocdecode installed before running CTests")
else()
message("-- ${Yellow}${PROJECT_NAME} requires rocDecode. Install rocDecode before running CTests")
endif(ROCDECODE_FOUND)
find_package(rocdecode QUIET)
if(rocdecode_FOUND)
message("-- ${White}${PROJECT_NAME}: rocdecode found with find_package(rocdecode QUIET)${ColourReset}")
message("-- \t${White}rocdecode_INCLUDE_DIR -- ${rocdecode_INCLUDE_DIR}${ColourReset}")
message("-- \t${White}rocdecode_LIB_DIR -- ${rocdecode_LIB_DIR}${ColourReset}")
message("-- \t${White}rocdecode_LIBRARY -- ${rocdecode_LIBRARY}${ColourReset}")
message("-- \t${White}rocdecode_FOUND -- ${rocdecode_FOUND}${ColourReset}")
message("-- \t${White}rocdecode_VERSION -- ${rocdecode_VERSION}${ColourReset}")
message("-- \t${White}rocdecode_VERSION_MAJOR -- ${rocdecode_VERSION_MAJOR}${ColourReset}")
message("-- \t${White}rocdecode_VERSION_MINOR -- ${rocdecode_VERSION_MINOR}${ColourReset}")
message("-- \t${White}rocdecode_VERSION_PATCH -- ${rocdecode_VERSION_PATCH}${ColourReset}")
else()
message("-- ${Yellow}${PROJECT_NAME} requires rocdecode. Install rocdecode before running CTests")
endif(rocdecode_FOUND)
endif(BUILD_FROM_SOURCE)
# 1 - videoDecode HEVC
add_test(
@@ -44,10 +44,10 @@ project(rocdecodenegativetest)
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/../../cmake)
list(APPEND CMAKE_PREFIX_PATH ${ROCM_PATH}/lib/cmake)
# rocDecode sample build type
# rocdecode sample build type
set(DEFAULT_BUILD_TYPE "Release")
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "${DEFAULT_BUILD_TYPE}" CACHE STRING "rocDecode Default Build Type" FORCE)
set(CMAKE_BUILD_TYPE "${DEFAULT_BUILD_TYPE}" CACHE STRING "rocdecode Default Build Type" FORCE)
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release")
endif()
if(CMAKE_BUILD_TYPE MATCHES Debug)
@@ -68,9 +68,9 @@ find_package(rocprofiler-register QUIET)
if(HIP_FOUND AND rocdecode_FOUND AND rocprofiler-register_FOUND)
# HIP
set(LINK_LIBRARY_LIST ${LINK_LIBRARY_LIST} hip::host)
# rocDecode and utils
# rocdecode and utils
include_directories (${rocdecode_INCLUDE_DIR} ${CMAKE_CURRENT_SOURCE_DIR})
set(LINK_LIBRARY_LIST ${LINK_LIBRARY_LIST} ${rocdecode_LIBRARY})
set(LINK_LIBRARY_LIST ${LINK_LIBRARY_LIST} rocdecode::rocdecode)
# rocprofiler-register
set(LINK_LIBRARY_LIST ${LINK_LIBRARY_LIST} rocprofiler-register::rocprofiler-register)
# sample app exe
@@ -84,8 +84,8 @@ else()
if (NOT HIP_FOUND)
message(FATAL_ERROR "-- ERROR!: HIP Not Found! - please install ROCm and HIP!")
endif()
if (NOT ROCDECODE_FOUND)
message(FATAL_ERROR "-- ERROR!: rocDecode Not Found! - please install rocDecode!")
if (NOT rocdecode_FOUND)
message(FATAL_ERROR "-- ERROR!: rocdecode Not Found! - please install rocdecode!")
endif()
if (NOT rocprofiler-register_FOUND)
message(FATAL_ERROR "-- ERROR!: rocprofiler-register Not Found! - please install rocprofiler-register!")