summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorLeander Beernaert <leander.beernaert@qt.io>2019-10-21 15:27:26 +0200
committerSimon Hausmann <simon.hausmann@qt.io>2019-10-21 17:56:51 +0000
commitc4b7f79e76e6ee20a0acacf97fed7ab6d89798eb (patch)
tree514e38fa6a42b47f9a6ed6eac28f67e0f7f60b49 /src/plugins
parent13f1be6cd65b74dc32b5902fd5eb847cc5867ae6 (diff)
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 <simon.hausmann@qt.io> Reviewed-by: Qt CMake Build Bot
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/platforms/xcb/CMakeLists.txt17
1 files changed, 16 insertions, 1 deletions
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
+ $<$<TARGET_EXISTS: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:
#####################################################################