From 1892bdef8342f4d3f09bb089637bf79f69e98cdc Mon Sep 17 00:00:00 2001 From: Sajina PK Date: Mon, 14 Jul 2025 19:23:19 -0400 Subject: [PATCH] Make CMakeFile fixes to align with rocDecode and rocJpeg changes (#281) [ROCm/rocprofiler-systems commit: be06384250855043100c3688b540e747b97c54d4] --- .../examples/jpegdecode/CMakeLists.txt | 12 ++++++------ .../examples/videodecode/CMakeLists.txt | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/projects/rocprofiler-systems/examples/jpegdecode/CMakeLists.txt b/projects/rocprofiler-systems/examples/jpegdecode/CMakeLists.txt index 5381ae0987..e92c8f5e34 100644 --- a/projects/rocprofiler-systems/examples/jpegdecode/CMakeLists.txt +++ b/projects/rocprofiler-systems/examples/jpegdecode/CMakeLists.txt @@ -60,7 +60,7 @@ if(ROCPROFSYS_DISABLE_EXAMPLES) endif() endif() -find_package(ROCJPEG QUIET) +find_package(rocjpeg QUIET) find_package(rocprofiler-register QUIET) # Copy image files to build directory @@ -95,7 +95,7 @@ endfunction() # threads find_package(Threads REQUIRED) -if(HIP_FOUND AND ROCJPEG_FOUND AND Threads_FOUND AND rocprofiler-register_FOUND) +if(HIP_FOUND AND rocjpeg_FOUND AND Threads_FOUND AND rocprofiler-register_FOUND) # HIP set(LINK_LIBRARY_LIST ${LINK_LIBRARY_LIST} hip::host) # threads @@ -107,9 +107,9 @@ if(HIP_FOUND AND ROCJPEG_FOUND AND Threads_FOUND AND rocprofiler-register_FOUND) set(LINK_LIBRARY_LIST ${LINK_LIBRARY_LIST} rocprofiler-register::rocprofiler-register) # rocJPEG - message(STATUS "RocJPEG library found: ${ROCJPEG_LIBRARY}") - include_directories(${ROCJPEG_INCLUDE_DIR}) - set(LINK_LIBRARY_LIST ${LINK_LIBRARY_LIST} ${ROCJPEG_LIBRARY}) + message(STATUS "RocJPEG library found: ${rocjpeg_LIBRARIES}") + include_directories(${rocjpeg_INCLUDE_DIR}) + set(LINK_LIBRARY_LIST ${LINK_LIBRARY_LIST} rocjpeg::rocjpeg) list(APPEND SOURCES ${PROJECT_SOURCE_DIR} jpegdecodeperf.cpp) add_executable(jpegdecode ${SOURCES}) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++17") @@ -132,7 +132,7 @@ else() if(NOT HIP_FOUND) message(FATAL_ERROR "-- ERROR!: HIP Not Found! - please install ROCm and HIP!") endif() - if(NOT ROCJPEG_FOUND) + if(NOT rocjpeg_FOUND) message(WARNING "-- ERROR!: rocJPEG Not Found! - please install rocJPEG!") endif() if(NOT Threads_FOUND) diff --git a/projects/rocprofiler-systems/examples/videodecode/CMakeLists.txt b/projects/rocprofiler-systems/examples/videodecode/CMakeLists.txt index ce1a50a0df..f8e8fcbf09 100644 --- a/projects/rocprofiler-systems/examples/videodecode/CMakeLists.txt +++ b/projects/rocprofiler-systems/examples/videodecode/CMakeLists.txt @@ -54,8 +54,8 @@ function(videodecode_message _MSG_TYPE) endfunction() # Find RocDecode -find_package(ROCDECODE QUIET) -if(NOT ROCDECODE_FOUND) +find_package(rocdecode QUIET) +if(NOT rocdecode_FOUND) videodecode_message(AUTHOR_WARNING "${PROJECT_NAME} skipped. Missing RocDecode...") return() endif() @@ -102,7 +102,7 @@ set(FFMPEG_INCLUDE_DIRS ${FFMPEG_INCLUDE_DIR}) mark_as_advanced(FFMPEG_INCLUDE_DIR AVCODEC_LIBRARY AVFORMAT_LIBRARY AVUTIL_LIBRARY) -if(FFMPEG_FOUND AND ROCDECODE_FOUND) +if(FFMPEG_FOUND AND rocdecode_FOUND) # HIP set(LINK_LIBRARY_LIST ${LINK_LIBRARY_LIST} hip::host) @@ -116,8 +116,8 @@ if(FFMPEG_FOUND AND ROCDECODE_FOUND) endif() # rocDecode - include_directories(${ROCDECODE_INCLUDE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/..) - set(LINK_LIBRARY_LIST ${LINK_LIBRARY_LIST} ${ROCDECODE_LIBRARY}) + include_directories(${rocdecode_INCLUDE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/..) + set(LINK_LIBRARY_LIST ${LINK_LIBRARY_LIST} rocdecode::rocdecode) # Threads set(THREADS_PREFER_PTHREAD_FLAG ON) @@ -155,7 +155,7 @@ else() if(NOT FFMPEG_FOUND) message(WARNING "-- ERROR!: FFMPEG Not Found! - please install FFMPEG!") endif() - if(NOT ROCDECODE_FOUND) + if(NOT rocdecode_FOUND) message(WARNING "-- ERROR!: rocDecode Not Found! - please install rocDecode!") endif() endif()