From c4f625a3d1bc20fe7d1b7a5d91376f7c88b4a01c Mon Sep 17 00:00:00 2001 From: Jonathan White Date: Mon, 27 Jun 2022 11:04:09 -0400 Subject: [PATCH] cmake: emit warning if X11_Xi or X11_XTest not found at least on Debian, a bullseye installation, the X11 development files may be installed without the libxi-dev or the libxtest-dev packages. this leads to the autotype shared library libkeepassxc-autotype-xcb.so not being built without any complaint from cmake. this commit makes cmake emit warning messages that shall hint anyone building themselves that autotype will not work without these libs. cmake: make libxi and libxtst a requirement with autotype enabled --- src/autotype/CMakeLists.txt | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/autotype/CMakeLists.txt b/src/autotype/CMakeLists.txt index 6b9b8b678..79bb50372 100644 --- a/src/autotype/CMakeLists.txt +++ b/src/autotype/CMakeLists.txt @@ -1,16 +1,14 @@ if(WITH_XC_AUTOTYPE) if(UNIX AND NOT APPLE AND NOT HAIKU) - find_package(X11) - find_package(Qt5X11Extras 5.2) + find_package(X11 REQUIRED COMPONENTS Xi XTest) + find_package(Qt5X11Extras 5.2 REQUIRED) if(PRINT_SUMMARY) add_feature_info(libXi X11_Xi_FOUND "The X11 Xi Protocol library is required for auto-type") add_feature_info(libXtst X11_XTest_FOUND "The X11 XTEST Protocol library is required for auto-type") add_feature_info(Qt5X11Extras Qt5X11Extras_FOUND "The Qt5X11Extras library is required for auto-type") endif() - if(X11_FOUND AND X11_Xi_FOUND AND X11_XTest_FOUND AND Qt5X11Extras_FOUND) - add_subdirectory(xcb) - endif() + add_subdirectory(xcb) elseif(APPLE) add_subdirectory(mac) elseif(WIN32)