From c4b7f79e76e6ee20a0acacf97fed7ab6d89798eb Mon Sep 17 00:00:00 2001 From: Leander Beernaert Date: Mon, 21 Oct 2019 15:27:26 +0200 Subject: Mimic qmake by building our own xinput When we don't find the xinput library on the system, build it ourselves. Change-Id: I399e847513cdd1c2dcdc1d862265284002f8808a Reviewed-by: Simon Hausmann Reviewed-by: Qt CMake Build Bot --- src/plugins/platforms/xcb/CMakeLists.txt | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/plugins/platforms/xcb/CMakeLists.txt b/src/plugins/platforms/xcb/CMakeLists.txt index 194cbc79a9..1706cdf713 100644 --- a/src/plugins/platforms/xcb/CMakeLists.txt +++ b/src/plugins/platforms/xcb/CMakeLists.txt @@ -89,7 +89,7 @@ add_qt_module(XcbQpa XCB::XCB XCB::XFIXES XCB::XINERAMA - XCB::XINPUT + $<$:XCB::XINPUT> # special case XCB::XKB XKB::XKB ) @@ -172,6 +172,21 @@ extend_target(XcbQpa CONDITION QT_FEATURE_fontconfig AND QT_FEATURE_xcb_native_p LIBRARIES WrapFreetype::WrapFreetype ) + +# special case begin +if (NOT QT_FEATURE_system_xcb_input) + set(xinput_source "${PROJECT_SOURCE_DIR}/src/3rdparty/xcb/libxcb/xinput.c") + set_source_files_properties( + "${xinput_source}" + PROPERTIES COMPILE_OPTIONS "-w" + ) + target_sources(XcbQpa PRIVATE "${xinput_source}") + target_include_directories(XcbQpa PRIVATE + "${PROJECT_SOURCE_DIR}/src/3rdparty/xcb/include" + ) +endif() +# special case end + ##################################################################### ## qxcb Plugin: ##################################################################### -- cgit v1.2.3