On Mon, Mar 22, 2021 at 01:20:21PM -0700, Jianxin Xiong wrote: > Some vendor specific DRM headers may be missing on systems with old > kernels. Make sure that all headers needed by pyverbs/dmabuf_alloc.c > are present before enabling that module. > > Remove unused reference of "radeon_drm.h" from pyverbs/dmabuf_alloc.c. > > Signed-off-by: Jianxin Xiong <jianxin.xiong@xxxxxxxxx> > CMakeLists.txt | 6 +++++- > pyverbs/dmabuf_alloc.c | 1 - > 2 files changed, 5 insertions(+), 2 deletions(-) > > diff --git a/CMakeLists.txt b/CMakeLists.txt > index e9a2f49..1208ab6 100644 > +++ b/CMakeLists.txt > @@ -526,7 +526,11 @@ if (NOT DRM_INCLUDE_DIRS) > endif() > > if (DRM_INCLUDE_DIRS) > - include_directories(${DRM_INCLUDE_DIRS}) > + if (EXISTS ${DRM_INCLUDE_DIRS}/i915_drm.h AND EXISTS ${DRM_INCLUDE_DIRS}/amdgpu_drm.h) > + include_directories(${DRM_INCLUDE_DIRS}) It should be in a compile test not coded like this. The whole thing is getting complex, it should probably go into a find_package() subroutine Jason