From e2ef47031cc397dd41e8e8f744a07c29d70d2165 Mon Sep 17 00:00:00 2001 From: Aleix Pol Gonzalez Date: Fri, 9 Aug 2024 16:33:51 +0200 Subject: [PATCH] Only look up X11 if it's needed Do not look it up if KWIN_BUILD_X11=OFF. Signed-off-by: Falko Becker --- CMakeLists.txt | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 02cad62346..058773e494 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -285,6 +285,13 @@ if (KWIN_BUILD_X11) # for kwin internal things set(HAVE_X11_XCB ${X11_XCB_FOUND}) + + find_package(X11) + set_package_properties(X11 PROPERTIES + DESCRIPTION "X11 libraries" + URL "https://www.x.org" + TYPE REQUIRED + ) else() set(KWIN_BUILD_X11_BACKEND OFF CACHE BOOL "Enable building kwin_x11" FORCE) endif() @@ -322,12 +329,6 @@ endif() pkg_check_modules(Libxcvt IMPORTED_TARGET libxcvt>=0.1.1 REQUIRED) add_feature_info(Libxcvt Libxcvt_FOUND "Required for generating modes in the drm backend") -find_package(X11) -set_package_properties(X11 PROPERTIES - DESCRIPTION "X11 libraries" - URL "https://www.x.org" - TYPE REQUIRED -) add_feature_info("XInput" X11_Xi_FOUND "Required for poll-free mouse cursor updates") set(HAVE_X11_XINPUT ${X11_Xinput_FOUND})