Rollup of build changes needed for compat with TheRock. (#1086)

* Rollup of build changes needed for compat with TheRock.
* When built for a non-default ROCM location, the HIP headers can't be found by a few targets.
* Uses pkg_check for DRM libraries like ROCR-Runtime does (which avoids accidental fallback to system versions).
* Robust fix for nolink targets
* nolink targets essentially exist for include directories
* all nolink targets are automatically added to rocprofiler-sdk-headers with a $<BUILD_INTERFACE:...> generator expression
* Re-add previously used mechanism to find drm libs

---------

Co-authored-by: Marius Brehler <marius.brehler@amd.com>
Co-authored-by: Stella Laurenzo <stellaraccident@gmail.com>
Co-authored-by: Jonathan R. Madsen <jonathanrmadsen@gmail.com>
This commit is contained in:
Marius Brehler
2025-10-01 00:39:10 +02:00
zatwierdzone przez GitHub
rodzic c6d44b47d4
commit 026a4e82a3
4 zmienionych plików z 57 dodań i 47 usunięć
@@ -92,21 +92,20 @@ rocprofiler_add_interface_library(rocprofiler-sdk-drm "drm (amdgpu) library" INT
# runtime library
#
rocprofiler_add_interface_library(
rocprofiler_add_nolink_interface_library(
rocprofiler-sdk-hip-nolink "rocprofiler-sdk-hip without linking to HIP library"
IMPORTED)
rocprofiler_add_interface_library(
rocprofiler_add_nolink_interface_library(
rocprofiler-sdk-hsa-runtime-nolink
"rocprofiler-sdk-hsa-runtime without linking to HSA library" IMPORTED)
rocprofiler_add_interface_library(
rocprofiler_add_nolink_interface_library(
rocprofiler-sdk-hsakmt-nolink
"rocprofiler-sdk-hsakmt without linking to HSAKMT library" IMPORTED)
rocprofiler_add_interface_library(rocprofiler-sdk-rccl-nolink
"RCCL headers without linking to RCCL library" IMPORTED)
rocprofiler_add_interface_library(
rocprofiler_add_nolink_interface_library(
rocprofiler-sdk-rccl-nolink "RCCL headers without linking to RCCL library" IMPORTED)
rocprofiler_add_nolink_interface_library(
rocprofiler-sdk-rocdecode-nolink
"ROCDECODE headers without linking to ROCDECODE library" IMPORTED)
rocprofiler_add_interface_library(
rocprofiler_add_nolink_interface_library(
rocprofiler-sdk-rocjpeg-nolink "ROCJPEG headers without linking to ROCJPEG library"
IMPORTED)