Skip to content

Commit

Permalink
cmake: Avoid "Unknown arguments specified"
Browse files Browse the repository at this point in the history
Without these arguments quoted, cmake 3.30.0 fails with

```
CMake Error at CMakeLists.txt:550 (if):
  if given arguments:

    "EXISTS" "/usr/include" "/usr/include/libdrm/i915_drm.h" "AND" "EXISTS" "/usr/include" "/usr/include/libdrm/amdgpu_drm.h"

  Unknown arguments specified
```

Signed-off-by: Jon Gjengset <jon@thesquareplanet.com>
  • Loading branch information
jonhoo committed Jul 20, 2024
1 parent f6ff7a3 commit 91faf54
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ if (NOT DRM_INCLUDE_DIRS)
endif()

if (DRM_INCLUDE_DIRS)
if (EXISTS ${DRM_INCLUDE_DIRS}/i915_drm.h AND EXISTS ${DRM_INCLUDE_DIRS}/amdgpu_drm.h)
if (EXISTS "${DRM_INCLUDE_DIRS}/i915_drm.h" AND EXISTS "${DRM_INCLUDE_DIRS}/amdgpu_drm.h")
include_directories(${DRM_INCLUDE_DIRS})
else()
unset(DRM_INCLUDE_DIRS CACHE)
Expand Down

0 comments on commit 91faf54

Please sign in to comment.