diff --git a/CMakeLists.txt b/CMakeLists.txt index bdac6c578e..bf2f34d946 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -482,7 +482,10 @@ set(kwin_XLIB_LIBS ${X11_X11_LIB} ${X11_ICE_LIB} ${X11_SM_LIB} - ${X11_Xinput_LIB} +) + +if(X11_Xinput_FOUND) + set(kwin_XLIB_LIBS ${kwin_XLIB_LIBS} ${X11_Xinput_LIB} ) set(kwin_XCB_LIBS