Skip to content

Commit

Permalink
cmake: Make dmabuf extension mandatory for Weston direct-display support
Browse files Browse the repository at this point in the history
Fail the build if the Weston direct display support was enabled but the
WPEBackend-FDO Video Plane DMABuf extension was not found. The Weston
direct-display support cannot work without it.

(cherry picked from commit 9f1d504)
  • Loading branch information
philn authored and aperezdc committed Feb 22, 2021
1 parent 5dde75a commit 77916ab
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -294,14 +294,16 @@ if (COG_PLATFORM_FDO AND NOT COG_USE_WEBKITGTK)
target_compile_definitions(cogplatform-fdo PRIVATE COG_FDO_WIDGETS_SUPPORTED=0)
endif ()

# Direct video display extension.
find_path(WPEBACKEND_FDO_HAS_VIDEO_PLANE_DISPLAY_DMABUF_EXT
NAMES wpe/extensions/video-plane-display-dmabuf.h
PATHS ${COGPLATFORM_FDO_DEPS_INCLUDE_DIRS}
NO_DEFAULT_PATH
)
if (COG_WESTON_DIRECT_DISPLAY)

# Direct video display extension.
find_path(WPEBACKEND_FDO_HAS_VIDEO_PLANE_DISPLAY_DMABUF_EXT
NAMES wpe/extensions/video-plane-display-dmabuf.h
PATHS ${WpeFDO_INCLUDE_DIRS}
NO_DEFAULT_PATH
REQUIRED
)

if (COG_WESTON_DIRECT_DISPLAY AND WPEBACKEND_FDO_HAS_VIDEO_PLANE_DISPLAY_DMABUF_EXT)
pkg_check_modules(LIBWESTON REQUIRED libweston-9-protocols)
pkg_get_variable(LIBWESTON_PKG_DATA_DIR libweston-9-protocols "pkgdatadir")
add_wayland_protocol(cogplatform-fdo CLIENT "${LIBWESTON_PKG_DATA_DIR}/weston-direct-display.xml")
Expand Down

0 comments on commit 77916ab

Please sign in to comment.