summaryrefslogtreecommitdiff
path: root/source/l/qt5/patches/qt5.qtbug-76255.patch
blob: 678913ce5e27d5bed8efd27b46a2f4c40135bd80 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
From cc32a691936f37eaaec618a71edd62f896009c9d Mon Sep 17 00:00:00 2001
From: Joerg Bornemann <joerg.bornemann@qt.io>
Date: Fri, 06 Sep 2019 10:54:44 +0200
Subject: [PATCH] Fix CMake config files for -libdir different from "lib"

When Qt was configured with -libdir different from "lib", one could not
build with CMake whenever a static lib was pulled in (e.g. uitools).

Do not hard-code "/lib" but use the correct variable also for static
libraries.

Fixes: QTBUG-76255
Change-Id: I28c6861752e29e461247628d2b1f8a9ec32f0790
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Fabian Vogt <fabian@ritter-vogt.de>
---

diff --git a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
index d4fd057..f4a34d6 100644
--- a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
+++ b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
@@ -53,7 +53,11 @@
     set(_lib_deps)
     set(_link_flags)
 
-    get_filename_component(_qt5_install_libs \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/lib\" ABSOLUTE)
+!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
+    set(_qt5_install_libs \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}\")
+!!ELSE
+    set(_qt5_install_libs \"$${CMAKE_LIB_DIR}\")
+!!ENDIF
 
     if(EXISTS \"${prl_file_location}\")
         file(STRINGS \"${prl_file_location}\" _prl_strings REGEX \"QMAKE_PRL_LIBS_FOR_CMAKE[ \\t]*=\")