d0c2770cde
Instead of hard-coding lib64 and other include locations, just prepend the DRM_DIR to the beginning of the CMake prefix path. Then let pkgconfig find the package, the same way that it would if DRM_DIR wasn't set. DRM_DIR takes precedence, but the default paths will be used if DRM_DIR isn't set, or doesn't point to where libdrm is housed Note that /lib and /lib/$ARCH aren't required for DRM_DIR, just the path to the root folder for the package (e.g. /opt/amdgpu instead of /opt/amdgpu/lib or /opt/amdgpu/lib64 or /opt/amdgpu/lib/x86_64-linux-gnu etc) Change-Id: I56767db28476d14e3fa77be1089c3904e2a32450
1. Note on building kfdtest To build this kfdtest application, the following libraries should be already installed on the building machine: libdrm libdrm_amdgpu libhsakmt If libhsakmt is not installed, but the headers and libraries are present locally, you can specify its directory by export LIBHSAKMT_PATH=/*your local libhsakmt folder*/ With that, the headers and libraries are searched under LIBHSAKMT_PATH/include and LIBHSAKMT_PATH/lib respectively. 2. How to run kfdtest Just run "./run_kfdtest.sh" under the building output folder. You may need to specify library path through: export LD_LIBRARY_PATH=/*your library path containing libhsakmt*/ Note: you can use "run_kfdtest.sh -h" to see more options.