From 6ab54bc95a9cc0baaa3a787fa554b7bfdcfdc227 Mon Sep 17 00:00:00 2001 From: Felix Geyer Date: Wed, 23 Sep 2015 22:26:49 +0200 Subject: [PATCH] Check if libXi is installed and explicitly link against it. --- src/autotype/CMakeLists.txt | 3 ++- src/autotype/x11/CMakeLists.txt | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/autotype/CMakeLists.txt b/src/autotype/CMakeLists.txt index 0bf5fc252..a0f7877fc 100644 --- a/src/autotype/CMakeLists.txt +++ b/src/autotype/CMakeLists.txt @@ -1,10 +1,11 @@ if(Q_WS_X11) find_package(X11) if(PRINT_SUMMARY) + add_feature_info(libXi X11_Xi_FOUND "The X11 Xi Protocol library is required for auto-type") add_feature_info(libXtest X11_XTest_FOUND "The X11 XTEST Protocol library is required for auto-type") endif() - if(X11_FOUND AND X11_XTest_FOUND) + if(X11_FOUND AND X11_Xi_FOUND AND X11_XTest_FOUND) add_subdirectory(x11) endif() endif() diff --git a/src/autotype/x11/CMakeLists.txt b/src/autotype/x11/CMakeLists.txt index e98355772..cc401f7e4 100644 --- a/src/autotype/x11/CMakeLists.txt +++ b/src/autotype/x11/CMakeLists.txt @@ -11,7 +11,7 @@ set(autotype_X11_MOC qt4_wrap_cpp(autotype_X11_SOURCES ${autotype_X11_MOC}) add_library(keepassx-autotype-x11 MODULE ${autotype_X11_SOURCES}) -target_link_libraries(keepassx-autotype-x11 ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${X11_X11_LIB} ${X11_XTest_LIB}) +target_link_libraries(keepassx-autotype-x11 ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${X11_X11_LIB} ${X11_Xi_LIB} ${X11_XTest_LIB}) install(TARGETS keepassx-autotype-x11 BUNDLE DESTINATION . COMPONENT Runtime LIBRARY DESTINATION ${PLUGIN_INSTALL_DIR} COMPONENT Runtime)