Check if libXi is installed and explicitly link against it.

This commit is contained in:
Felix Geyer 2015-09-23 22:26:49 +02:00
parent 673dff2268
commit 6ab54bc95a
2 changed files with 3 additions and 2 deletions

View File

@ -1,10 +1,11 @@
if(Q_WS_X11) if(Q_WS_X11)
find_package(X11) find_package(X11)
if(PRINT_SUMMARY) 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") add_feature_info(libXtest X11_XTest_FOUND "The X11 XTEST Protocol library is required for auto-type")
endif() endif()
if(X11_FOUND AND X11_XTest_FOUND) if(X11_FOUND AND X11_Xi_FOUND AND X11_XTest_FOUND)
add_subdirectory(x11) add_subdirectory(x11)
endif() endif()
endif() endif()

View File

@ -11,7 +11,7 @@ set(autotype_X11_MOC
qt4_wrap_cpp(autotype_X11_SOURCES ${autotype_X11_MOC}) qt4_wrap_cpp(autotype_X11_SOURCES ${autotype_X11_MOC})
add_library(keepassx-autotype-x11 MODULE ${autotype_X11_SOURCES}) 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 install(TARGETS keepassx-autotype-x11
BUNDLE DESTINATION . COMPONENT Runtime BUNDLE DESTINATION . COMPONENT Runtime
LIBRARY DESTINATION ${PLUGIN_INSTALL_DIR} COMPONENT Runtime) LIBRARY DESTINATION ${PLUGIN_INSTALL_DIR} COMPONENT Runtime)