diff options
author | Bernhard Kirchen <schlimmchen@posteo.net> | 2022-04-05 14:09:14 +0300 |
---|---|---|
committer | Jonathan White <support@dmapps.us> | 2022-06-19 17:34:52 +0300 |
commit | 861fe2e5a9ec1025f89591b14017fc3880fb3733 (patch) | |
tree | 42bd57bcd7e4ed27ef9bf1907f792902c6383cf0 | |
parent | 63a5e474a6bfd560459b5e324246836ecca428d0 (diff) |
cmake: make libxi and libxtst a requirement with autotype enabled
-rw-r--r-- | src/autotype/CMakeLists.txt | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/src/autotype/CMakeLists.txt b/src/autotype/CMakeLists.txt index 7d740e226..79bb50372 100644 --- a/src/autotype/CMakeLists.txt +++ b/src/autotype/CMakeLists.txt @@ -1,26 +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() - # an error will be emitted by find_package above if X11 (or Qt5X11Extras) dev files were not found. - # X11 possibly is installed and found while X11_Xi and/or X11_XTest are not, so we emit a warning. - if(NOT X11_Xi_FOUND) - message(WARNING "The X11 Xi Protocol library is required for auto-type (try libxi-dev package)") - endif() - - if(NOT X11_XTest_FOUND) - message(WARNING "The X11 XTEST Protocol library is required for auto-type (try libxtst-dev package)") - 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) |