diff options
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 107456bba..6dc89a1dc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -202,6 +202,20 @@ if(PIGLIT_USE_WAYLAND) "Failed to find xkbcommon library.") endif() pkg_check_modules(XKBCOMMON QUIET xkbcommon) + + pkg_check_modules(WaylandProtocols REQUIRED wayland-protocols>=1.24) + pkg_get_variable(WaylandProtocols_DATADIR wayland-protocols pkgdatadir) + if (NOT WaylandProtocols_DATADIR) + message(FATAL_ERROR "Failed to find wayland-protocols XML path") + endif() + + pkg_check_modules(WaylandScanner REQUIRED wayland-scanner) + pkg_get_variable(WaylandScannerPath wayland-scanner wayland_scanner) + if (NOT WaylandScannerPath) + message(FATAL_ERROR "Failed to find wayland-scanner path from pkg-config") + endif() + add_executable(WaylandScannerExe IMPORTED) + set_property(TARGET WaylandScannerExe PROPERTY IMPORTED_LOCATION ${WaylandScannerPath}) endif() if(PIGLIT_USE_X11 AND OPENGL_gl_LIBRARY AND PIGLIT_BUILD_GLX_TESTS) @@ -222,6 +236,14 @@ IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux") pkg_check_modules(LIBVULKAN QUIET vulkan) ENDIF() +if(LIBDRM_FOUND) + if(LIBDRM_VERSION VERSION_GREATER "2.4.109") + set(PIGLIT_HAS_DRM_GET_DEVICE_BY_DEVID true) + else() + set(PIGLIT_HAS_DRM_GET_DEVICE_BY_DEVID false) + endif() +endif() + if(PIGLIT_BUILD_VK_TESTS) if (NOT LIBVULKAN_FOUND) message(FATAL_ERROR "libvulkan required by vulkan tests not found") |