diff options
author | Alexey Edelev <alexey.edelev@qt.io> | 2024-01-19 12:24:10 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2024-01-20 01:21:27 +0000 |
commit | 55e80eae91d950c57106ae05ca5f2e397edb4da7 (patch) | |
tree | a532c560f597eee4704b7cac2cf18489c2dd9ba8 | |
parent | abcf6dc36cca60079caadc15df1f8a2ec7ad2d40 (diff) |
Force CMake to look for static versions of xcb components
Add the USE_XCB_<component>_STATIC switches that force using the
static versions of xcb components if necessary.
The xcb components needs to be built with -fPIC option, to make the
static linking possible.
When Qt is built staticaly USE_XCB_<component>_STATIC needs to be
passed to the application command line, since in static case xcb
libraries are resolved and linked when configuring application, but
not when building Qt.
Pick-to: 6.5
Task-number: QTBUG-120769
Change-Id: I274e9cf4a6a111dc87ad84bb7f49cad76a3d364a
Reviewed-by: Liang Qi <liang.qi@qt.io>
(cherry picked from commit 6ce6ff1c529a7a4a09f211980cc749c2b3aa0dab)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit f9d97ee04aed519e78e0b9114866512f83c5a203)
-rw-r--r-- | cmake/3rdparty/extra-cmake-modules/find-modules/FindXCB.cmake | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/cmake/3rdparty/extra-cmake-modules/find-modules/FindXCB.cmake b/cmake/3rdparty/extra-cmake-modules/find-modules/FindXCB.cmake index dc60289401..26b9bf8963 100644 --- a/cmake/3rdparty/extra-cmake-modules/find-modules/FindXCB.cmake +++ b/cmake/3rdparty/extra-cmake-modules/find-modules/FindXCB.cmake @@ -137,6 +137,9 @@ foreach(_comp ${XCB_known_components}) set(XCB_${_comp}_pkg_config "xcb-${_lc_comp}") set(XCB_${_comp}_lib "xcb-${_lc_comp}") set(XCB_${_comp}_header "xcb/${_lc_comp}.h") + if(USE_XCB_${_comp}_STATIC) + set(XCB_${_comp}_lib "lib${XCB_${_comp}_lib}.a") + endif() endforeach() # exceptions set(XCB_XCB_component_deps) |