FetchRGA.cmake 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #
  2. # Copyright (c) Contributors to the Open 3D Engine Project.
  3. # For complete copyright and license terms please see the LICENSE at the root of this distribution.
  4. #
  5. # SPDX-License-Identifier: Apache-2.0 OR MIT
  6. #
  7. #
  8. if (APPLE)
  9. return() # RGA is not applicable to APPLE host platforms.
  10. endif()
  11. # This script encapsulates fetching RGA as a dependency and providing the
  12. # requested targets. To use it, simply include this script from the CMakeLists.txt
  13. # file of the target platform.
  14. include(FetchContent)
  15. # note that this won't stop it from trying each time, but will stop it from doing anything multiple times in the same
  16. # cmake invocation.
  17. FetchContent_GetProperties(rga)
  18. if (NOT rga_POPULATED)
  19. message(STATUS "Checking to see if Radeon(™) GPU Analyzer needs to be downloaded... ")
  20. if (WIN32)
  21. FetchContent_Declare(
  22. RGA
  23. URL https://github.com/GPUOpen-Tools/radeon_gpu_analyzer/releases/download/2.6.2/rga-windows-x64-2.6.2.zip
  24. URL_HASH SHA256=35247f29bc81cd86e935b29af26a72cb5f762d4faba2b6aad404f661e639faee
  25. )
  26. else()
  27. FetchContent_Declare(
  28. RGA
  29. URL https://github.com/GPUOpen-Tools/radeon_gpu_analyzer/releases/download/2.6.2/rga-linux-2.6.2.tgz
  30. URL_HASH SHA256=e42e51a12de5ff908785603d9fc5bf88fb8f59dd98f7ed728e8346cae251f712
  31. )
  32. endif()
  33. FetchContent_MakeAvailable(RGA)
  34. message(STATUS "Radeon(™) GPU Analyzer is located in ${rga_SOURCE_DIR}")
  35. endif()