Commit 47cff0c9 authored by Louis Moureaux's avatar Louis Moureaux Committed by Nate Graham
Browse files

CMake: Explicitly check for required X11 libraries

CMake's FindX11 package reports that X11 was found even if not all libraries
are present. It also doesn't support proper components. This causes issues on
distros that split X11 headers into a myriad of small packages, for instance
Debian: some, but not all, components might be found.

Explicitly check that every X11 component used by Plasma was found by FindX11.
parent eb594ea7
......@@ -121,6 +121,20 @@ set_package_properties(X11 PROPERTIES DESCRIPTION "X11 libraries"
URL "https://www.x.org"
TYPE OPTIONAL
PURPOSE "Required for building the X11 based workspace")
macro(check_X11_lib)
if (NOT TARGET X11::${ARGV0})
message(SEND_ERROR "Required component ${ARGV0} of X11 was not found")
endif()
endmacro()
check_X11_lib(ICE)
check_X11_lib(SM)
check_X11_lib(X11)
check_X11_lib(Xau)
check_X11_lib(Xcursor)
check_X11_lib(Xfixes)
check_X11_lib(Xft)
check_X11_lib(Xrender)
check_X11_lib(Xtst)
find_package(PkgConfig REQUIRED)
pkg_check_modules(PipeWire IMPORTED_TARGET libpipewire-0.3)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment