Skip to content

Commit 2654927

Browse files
committed
Merge #18297: build: Use pkg-config in BITCOIN_QT_CONFIGURE for all hosts including Windows
8a26848 build: Fix m4 escaping (Hennadii Stepanov) 9123ec1 build: Remove extra tokens warning (Hennadii Stepanov) fded4f4 build: Remove duplicated QT_STATICPLUGIN define (Hennadii Stepanov) 05a93d5 build: Fix indentation in bitcoin_qt.m4 (Hennadii Stepanov) ddbb419 build: Use pkg-config in BITCOIN_QT_CONFIGURE for all hosts (Hennadii Stepanov) 492971d build: Fix mingw pkgconfig file and dependency naming (Hennadii Stepanov) Pull request description: This PR makes `bitcoin_qt.m4` to use `pkg-config` for all hosts and removes non-pkg-config paths from it. This is a step towards the idea which was clear [stated](bitcoin/bitcoin#8314 (comment)) by Cory Fields: > I believe the consensus is to treat Windows like the others and require pkg-config across the board. We can drop all of the non-pkg-config paths, and simply AC_REQUIRE(PKG_PROG_PKG_CONFIG) There are two unsolved problems with this PR. If depends is built with `DEBUG=1` the `configure` script fails to pickup Qt: - for macOS host (similar to, but not the same as #16391) - for Windows host (regression) The fix is ~on its way~ submitted in #18298 (as a followup). Also this PR picks some small improvements from #17820. ACKs for top commit: theuni: Code review ACK 8a26848 dongcarl: Code Review ACK 8a26848 laanwj: Code review ACK 8a26848 Tree-SHA512: 3b25990934b939121983df7707997b31d61063b1207d909f539d69494c7cb85212f353092956d09ecffebb9fef28b869914dd1216a596d102fcb9744bb5487f7
2 parents 8c97780 + 8a26848 commit 2654927

File tree

4 files changed

+44
-217
lines changed

4 files changed

+44
-217
lines changed

build-aux/m4/bitcoin_qt.m4

Lines changed: 29 additions & 205 deletions
Original file line numberDiff line numberDiff line change
@@ -79,25 +79,12 @@ AC_DEFUN([BITCOIN_QT_INIT],[
7979
AC_SUBST(QT_TRANSLATION_DIR,$qt_translation_path)
8080
])
8181

82-
dnl Find the appropriate version of Qt libraries and includes.
83-
dnl Inputs: $1: Whether or not pkg-config should be used. yes|no. Default: yes.
84-
dnl Inputs: $2: If $1 is "yes" and --with-gui=auto, which qt version should be
85-
dnl tried first.
86-
dnl Outputs: See _BITCOIN_QT_FIND_LIBS_*
82+
dnl Find Qt libraries and includes.
83+
dnl Outputs: See _BITCOIN_QT_FIND_LIBS
8784
dnl Outputs: Sets variables for all qt-related tools.
8885
dnl Outputs: bitcoin_enable_qt, bitcoin_enable_qt_dbus, bitcoin_enable_qt_test
8986
AC_DEFUN([BITCOIN_QT_CONFIGURE],[
90-
use_pkgconfig=$1
91-
92-
if test "x$use_pkgconfig" = x; then
93-
use_pkgconfig=yes
94-
fi
95-
96-
if test "x$use_pkgconfig" = xyes; then
97-
BITCOIN_QT_CHECK([_BITCOIN_QT_FIND_LIBS_WITH_PKGCONFIG])
98-
else
99-
BITCOIN_QT_CHECK([_BITCOIN_QT_FIND_LIBS_WITHOUT_PKGCONFIG])
100-
fi
87+
BITCOIN_QT_CHECK([_BITCOIN_QT_FIND_LIBS])
10188
10289
dnl This is ugly and complicated. Yuck. Works as follows:
10390
dnl For Qt5, we can check a header to find out whether Qt is build
@@ -117,8 +104,8 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[
117104
_BITCOIN_QT_FIND_STATIC_PLUGINS
118105
AC_DEFINE(QT_STATICPLUGIN, 1, [Define this symbol if qt plugins are static])
119106
if test "x$TARGET_OS" != xandroid; then
120-
_BITCOIN_QT_CHECK_STATIC_PLUGINS([Q_IMPORT_PLUGIN(QMinimalIntegrationPlugin)],[-lqminimal])
121-
AC_DEFINE(QT_QPA_PLATFORM_MINIMAL, 1, [Define this symbol if the minimal qt platform exists])
107+
_BITCOIN_QT_CHECK_STATIC_PLUGINS([Q_IMPORT_PLUGIN(QMinimalIntegrationPlugin)],[-lqminimal])
108+
AC_DEFINE(QT_QPA_PLATFORM_MINIMAL, 1, [Define this symbol if the minimal qt platform exists])
122109
fi
123110
if test "x$TARGET_OS" = xwindows; then
124111
_BITCOIN_QT_CHECK_STATIC_PLUGINS([Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin)],[-lqwindows])
@@ -139,7 +126,7 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[
139126
CXXFLAGS=$TEMP_CXXFLAGS
140127
])
141128
142-
if test "x$use_pkgconfig$qt_bin_path" = xyes; then
129+
if test "x$qt_bin_path" = x; then
143130
qt_bin_path="`$PKG_CONFIG --variable=host_bins Qt5Core 2>/dev/null`"
144131
fi
145132
@@ -213,7 +200,7 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[
213200
214201
215202
dnl enable qt support
216-
AC_MSG_CHECKING(whether to build ]AC_PACKAGE_NAME[ GUI)
203+
AC_MSG_CHECKING([whether to build ]AC_PACKAGE_NAME[ GUI])
217204
BITCOIN_QT_CHECK([
218205
bitcoin_enable_qt=yes
219206
bitcoin_enable_qt_test=yes
@@ -255,57 +242,15 @@ dnl All macros below are internal and should _not_ be used from the main
255242
dnl configure.ac.
256243
dnl ----
257244

258-
dnl Internal. Check included version of Qt against minimum specified in doc/dependencies.md
259-
dnl Requires: INCLUDES must be populated as necessary.
260-
dnl Output: bitcoin_cv_qt5=yes|no
261-
AC_DEFUN([_BITCOIN_QT_CHECK_QT5],[
262-
AC_CACHE_CHECK(for Qt 5, bitcoin_cv_qt5,[
263-
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
264-
#include <QtCore/qconfig.h>
265-
#ifndef QT_VERSION
266-
# include <QtCore/qglobal.h>
267-
#endif
268-
]],
269-
[[
270-
#if QT_VERSION < 0x050501
271-
choke
272-
#endif
273-
]])],
274-
[bitcoin_cv_qt5=yes],
275-
[bitcoin_cv_qt5=no])
276-
])])
277-
278-
dnl Internal. Check if the included version of Qt is greater than Qt58.
279-
dnl Requires: INCLUDES must be populated as necessary.
280-
dnl Output: bitcoin_cv_qt58=yes|no
281-
AC_DEFUN([_BITCOIN_QT_CHECK_QT58],[
282-
AC_CACHE_CHECK(for > Qt 5.7, bitcoin_cv_qt58,[
283-
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
284-
#include <QtCore/qconfig.h>
285-
#ifndef QT_VERSION
286-
# include <QtCore/qglobal.h>
287-
#endif
288-
]],
289-
[[
290-
#if QT_VERSION_MINOR < 8
291-
choke
292-
#endif
293-
]])],
294-
[bitcoin_cv_qt58=yes],
295-
[bitcoin_cv_qt58=no])
296-
])])
297-
298-
299245
dnl Internal. Check if the linked version of Qt was built as static libs.
300246
dnl Requires: Qt5.
301247
dnl Requires: INCLUDES and LIBS must be populated as necessary.
302248
dnl Output: bitcoin_cv_static_qt=yes|no
303-
dnl Output: Defines QT_STATICPLUGIN if plugins are static.
304249
AC_DEFUN([_BITCOIN_QT_IS_STATIC],[
305250
AC_CACHE_CHECK(for static Qt, bitcoin_cv_static_qt,[
306251
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
307252
#include <QtCore/qconfig.h>
308-
#ifndef QT_VERSION OR QT_VERSION_STR
253+
#ifndef QT_VERSION
309254
# include <QtCore/qglobal.h>
310255
#endif
311256
]],
@@ -317,9 +262,6 @@ AC_DEFUN([_BITCOIN_QT_IS_STATIC],[
317262
[bitcoin_cv_static_qt=yes],
318263
[bitcoin_cv_static_qt=no])
319264
])
320-
if test "x$bitcoin_cv_static_qt" = xyes; then
321-
AC_DEFINE(QT_STATICPLUGIN, 1, [Define this symbol for static Qt plugins])
322-
fi
323265
])
324266

325267
dnl Internal. Check if the link-requirements for static plugins are met.
@@ -353,70 +295,32 @@ AC_DEFUN([_BITCOIN_QT_FIND_STATIC_PLUGINS],[
353295
if test -d "$qt_plugin_path/platforms/android"; then
354296
QT_LIBS="$QT_LIBS -L$qt_plugin_path/platforms/android -lqtfreetype -lEGL"
355297
fi
356-
if test "x$use_pkgconfig" = xyes; then
357-
: dnl
358-
m4_ifdef([PKG_CHECK_MODULES],[
359-
if test x$bitcoin_cv_qt58 = xno; then
360-
PKG_CHECK_MODULES([QTPLATFORM], [Qt5PlatformSupport], [QT_LIBS="$QTPLATFORM_LIBS $QT_LIBS"])
361-
else
362-
PKG_CHECK_MODULES([QTFONTDATABASE], [Qt5FontDatabaseSupport], [QT_LIBS="-lQt5FontDatabaseSupport $QT_LIBS"])
363-
PKG_CHECK_MODULES([QTEVENTDISPATCHER], [Qt5EventDispatcherSupport], [QT_LIBS="-lQt5EventDispatcherSupport $QT_LIBS"])
364-
PKG_CHECK_MODULES([QTTHEME], [Qt5ThemeSupport], [QT_LIBS="-lQt5ThemeSupport $QT_LIBS"])
365-
PKG_CHECK_MODULES([QTDEVICEDISCOVERY], [Qt5DeviceDiscoverySupport], [QT_LIBS="-lQt5DeviceDiscoverySupport $QT_LIBS"])
366-
PKG_CHECK_MODULES([QTACCESSIBILITY], [Qt5AccessibilitySupport], [QT_LIBS="-lQt5AccessibilitySupport $QT_LIBS"])
367-
PKG_CHECK_MODULES([QTFB], [Qt5FbSupport], [QT_LIBS="-lQt5FbSupport $QT_LIBS"])
368-
fi
369-
if test "x$TARGET_OS" = xlinux; then
370-
PKG_CHECK_MODULES([QTXCBQPA], [Qt5XcbQpa], [QT_LIBS="$QTXCBQPA_LIBS $QT_LIBS"])
371-
elif test "x$TARGET_OS" = xdarwin; then
372-
PKG_CHECK_MODULES([QTCLIPBOARD], [Qt5ClipboardSupport], [QT_LIBS="-lQt5ClipboardSupport $QT_LIBS"])
373-
PKG_CHECK_MODULES([QTGRAPHICS], [Qt5GraphicsSupport], [QT_LIBS="-lQt5GraphicsSupport $QT_LIBS"])
374-
PKG_CHECK_MODULES([QTCGL], [Qt5CglSupport], [QT_LIBS="-lQt5CglSupport $QT_LIBS"])
375-
fi
376-
])
377-
else
378-
if test "x$TARGET_OS" = xwindows; then
379-
AC_CACHE_CHECK(for Qt >= 5.6, bitcoin_cv_need_platformsupport,[
380-
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
381-
#include <QtCore/qconfig.h>
382-
#ifndef QT_VERSION
383-
# include <QtCore/qglobal.h>
384-
#endif
385-
]],
386-
[[
387-
#if QT_VERSION < 0x050600 || QT_VERSION_MINOR < 6
388-
choke
389-
#endif
390-
]])],
391-
[bitcoin_cv_need_platformsupport=yes],
392-
[bitcoin_cv_need_platformsupport=no])
393-
])
394-
if test "x$bitcoin_cv_need_platformsupport" = xyes; then
395-
if test x$bitcoin_cv_qt58 = xno; then
396-
BITCOIN_QT_CHECK(AC_CHECK_LIB([${QT_LIB_PREFIX}PlatformSupport],[main],,BITCOIN_QT_FAIL(lib$QT_LIB_PREFIXPlatformSupport not found)))
397-
else
398-
BITCOIN_QT_CHECK(AC_CHECK_LIB([${QT_LIB_PREFIX}FontDatabaseSupport],[main],,BITCOIN_QT_FAIL(lib$QT_LIB_PREFIXFontDatabaseSupport not found)))
399-
BITCOIN_QT_CHECK(AC_CHECK_LIB([${QT_LIB_PREFIX}EventDispatcherSupport],[main],,BITCOIN_QT_FAIL(lib$QT_LIB_PREFIXEventDispatcherSupport not found)))
400-
BITCOIN_QT_CHECK(AC_CHECK_LIB([${QT_LIB_PREFIX}ThemeSupport],[main],,BITCOIN_QT_FAIL(lib$QT_LIB_PREFIXThemeSupport not found)))
401-
BITCOIN_QT_CHECK(AC_CHECK_LIB([${QT_LIB_PREFIX}FbSupport],[main],,BITCOIN_QT_FAIL(lib$QT_LIB_PREFIXFbSupport not found)))
402-
BITCOIN_QT_CHECK(AC_CHECK_LIB([${QT_LIB_PREFIX}DeviceDiscoverySupport],[main],,BITCOIN_QT_FAIL(lib$QT_LIB_PREFIXDeviceDiscoverySupport not found)))
403-
BITCOIN_QT_CHECK(AC_CHECK_LIB([${QT_LIB_PREFIX}AccessibilitySupport],[main],,BITCOIN_QT_FAIL(lib$QT_LIB_PREFIXAccessibilitySupport not found)))
404-
QT_LIBS="$QT_LIBS -lversion -ldwmapi -luxtheme"
405-
fi
406-
fi
407-
fi
408-
fi
409-
fi
298+
m4_ifdef([PKG_CHECK_MODULES],[
299+
if test x$bitcoin_cv_qt58 = xno; then
300+
PKG_CHECK_MODULES([QTPLATFORM], [Qt5PlatformSupport], [QT_LIBS="$QTPLATFORM_LIBS $QT_LIBS"])
301+
else
302+
PKG_CHECK_MODULES([QTFONTDATABASE], [Qt5FontDatabaseSupport], [QT_LIBS="-lQt5FontDatabaseSupport $QT_LIBS"])
303+
PKG_CHECK_MODULES([QTEVENTDISPATCHER], [Qt5EventDispatcherSupport], [QT_LIBS="-lQt5EventDispatcherSupport $QT_LIBS"])
304+
PKG_CHECK_MODULES([QTTHEME], [Qt5ThemeSupport], [QT_LIBS="-lQt5ThemeSupport $QT_LIBS"])
305+
PKG_CHECK_MODULES([QTDEVICEDISCOVERY], [Qt5DeviceDiscoverySupport], [QT_LIBS="-lQt5DeviceDiscoverySupport $QT_LIBS"])
306+
PKG_CHECK_MODULES([QTACCESSIBILITY], [Qt5AccessibilitySupport], [QT_LIBS="-lQt5AccessibilitySupport $QT_LIBS"])
307+
PKG_CHECK_MODULES([QTFB], [Qt5FbSupport], [QT_LIBS="-lQt5FbSupport $QT_LIBS"])
308+
fi
309+
if test "x$TARGET_OS" = xlinux; then
310+
PKG_CHECK_MODULES([QTXCBQPA], [Qt5XcbQpa], [QT_LIBS="$QTXCBQPA_LIBS $QT_LIBS"])
311+
elif test "x$TARGET_OS" = xdarwin; then
312+
PKG_CHECK_MODULES([QTCLIPBOARD], [Qt5ClipboardSupport], [QT_LIBS="-lQt5ClipboardSupport $QT_LIBS"])
313+
PKG_CHECK_MODULES([QTGRAPHICS], [Qt5GraphicsSupport], [QT_LIBS="-lQt5GraphicsSupport $QT_LIBS"])
314+
PKG_CHECK_MODULES([QTCGL], [Qt5CglSupport], [QT_LIBS="-lQt5CglSupport $QT_LIBS"])
315+
fi
316+
])
317+
fi
410318
])
411319

412320
dnl Internal. Find Qt libraries using pkg-config.
413-
dnl Inputs: bitcoin_qt_want_version (from --with-gui=). The version to check
414-
dnl first.
415-
dnl Inputs: $1: If bitcoin_qt_want_version is "auto", check for this version
416-
dnl first.
417321
dnl Outputs: All necessary QT_* variables are set.
418322
dnl Outputs: have_qt_test and have_qt_dbus are set (if applicable) to yes|no.
419-
AC_DEFUN([_BITCOIN_QT_FIND_LIBS_WITH_PKGCONFIG],[
323+
AC_DEFUN([_BITCOIN_QT_FIND_LIBS],[
420324
m4_ifdef([PKG_CHECK_MODULES],[
421325
QT_LIB_PREFIX=Qt5
422326
qt5_modules="Qt5Core Qt5Gui Qt5Network Qt5Widgets"
@@ -437,83 +341,3 @@ AC_DEFUN([_BITCOIN_QT_FIND_LIBS_WITH_PKGCONFIG],[
437341
])
438342
true; dnl
439343
])
440-
441-
dnl Internal. Find Qt libraries without using pkg-config. Version is deduced
442-
dnl from the discovered headers.
443-
dnl Inputs: bitcoin_qt_want_version (from --with-gui=). The version to use.
444-
dnl If "auto", the version will be discovered by _BITCOIN_QT_CHECK_QT5.
445-
dnl Outputs: All necessary QT_* variables are set.
446-
dnl Outputs: have_qt_test and have_qt_dbus are set (if applicable) to yes|no.
447-
AC_DEFUN([_BITCOIN_QT_FIND_LIBS_WITHOUT_PKGCONFIG],[
448-
TEMP_CPPFLAGS="$CPPFLAGS"
449-
TEMP_CXXFLAGS="$CXXFLAGS"
450-
CXXFLAGS="$PIC_FLAGS $CXXFLAGS"
451-
TEMP_LIBS="$LIBS"
452-
BITCOIN_QT_CHECK([
453-
if test "x$qt_include_path" != x; then
454-
QT_INCLUDES="-I$qt_include_path -I$qt_include_path/QtCore -I$qt_include_path/QtGui -I$qt_include_path/QtWidgets -I$qt_include_path/QtNetwork -I$qt_include_path/QtTest -I$qt_include_path/QtDBus"
455-
CPPFLAGS="$QT_INCLUDES $CPPFLAGS"
456-
fi
457-
])
458-
459-
BITCOIN_QT_CHECK([AC_CHECK_HEADER([QtPlugin],,BITCOIN_QT_FAIL(QtCore headers missing))])
460-
BITCOIN_QT_CHECK([AC_CHECK_HEADER([QApplication],, BITCOIN_QT_FAIL(QtGui headers missing))])
461-
BITCOIN_QT_CHECK([AC_CHECK_HEADER([QLocalSocket],, BITCOIN_QT_FAIL(QtNetwork headers missing))])
462-
463-
BITCOIN_QT_CHECK([
464-
if test "x$bitcoin_qt_want_version" = xauto; then
465-
_BITCOIN_QT_CHECK_QT5
466-
_BITCOIN_QT_CHECK_QT58
467-
fi
468-
QT_LIB_PREFIX=Qt5
469-
])
470-
471-
BITCOIN_QT_CHECK([
472-
LIBS=
473-
if test "x$qt_lib_path" != x; then
474-
LIBS="$LIBS -L$qt_lib_path"
475-
fi
476-
477-
if test "x$TARGET_OS" = xwindows; then
478-
AC_CHECK_LIB([imm32], [main],, BITCOIN_QT_FAIL(libimm32 not found))
479-
fi
480-
])
481-
482-
BITCOIN_QT_CHECK(AC_CHECK_LIB([z] ,[main],,AC_MSG_WARN([zlib not found. Assuming qt has it built-in])))
483-
if test x$bitcoin_cv_qt58 = xno; then
484-
BITCOIN_QT_CHECK(AC_SEARCH_LIBS([png_error] ,[qtpng png],,AC_MSG_WARN([libpng not found. Assuming qt has it built-in])))
485-
BITCOIN_QT_CHECK(AC_SEARCH_LIBS([pcre16_exec], [qtpcre pcre16],,AC_MSG_WARN([libpcre16 not found. Assuming qt has it built-in])))
486-
else
487-
BITCOIN_QT_CHECK(AC_SEARCH_LIBS([png_error] ,[qtlibpng png],,AC_MSG_WARN([libpng not found. Assuming qt has it built-in])))
488-
BITCOIN_QT_CHECK(AC_SEARCH_LIBS([pcre2_match_16], [qtpcre2 libqtpcre2],,AC_MSG_WARN([libqtpcre2 not found. Assuming qt has it built-in])))
489-
fi
490-
BITCOIN_QT_CHECK(AC_SEARCH_LIBS([hb_ot_tags_from_script] ,[qtharfbuzzng qtharfbuzz harfbuzz],,AC_MSG_WARN([libharfbuzz not found. Assuming qt has it built-in or support is disabled])))
491-
BITCOIN_QT_CHECK(AC_CHECK_LIB([${QT_LIB_PREFIX}Core] ,[main],,BITCOIN_QT_FAIL(lib${QT_LIB_PREFIX}Core not found)))
492-
BITCOIN_QT_CHECK(AC_CHECK_LIB([${QT_LIB_PREFIX}Gui] ,[main],,BITCOIN_QT_FAIL(lib${QT_LIB_PREFIX}Gui not found)))
493-
BITCOIN_QT_CHECK(AC_CHECK_LIB([${QT_LIB_PREFIX}Network],[main],,BITCOIN_QT_FAIL(lib${QT_LIB_PREFIX}Network not found)))
494-
BITCOIN_QT_CHECK(AC_CHECK_LIB([${QT_LIB_PREFIX}Widgets],[main],,BITCOIN_QT_FAIL(lib${QT_LIB_PREFIX}Widgets not found)))
495-
QT_LIBS="$LIBS"
496-
LIBS="$TEMP_LIBS"
497-
498-
BITCOIN_QT_CHECK([
499-
LIBS=
500-
if test "x$qt_lib_path" != x; then
501-
LIBS="-L$qt_lib_path"
502-
fi
503-
AC_CHECK_LIB([${QT_LIB_PREFIX}Test], [main],, have_qt_test=no)
504-
AC_CHECK_HEADER([QTest],, have_qt_test=no)
505-
QT_TEST_LIBS="$LIBS"
506-
if test "x$use_dbus" != xno; then
507-
LIBS=
508-
if test "x$qt_lib_path" != x; then
509-
LIBS="-L$qt_lib_path"
510-
fi
511-
AC_CHECK_LIB([${QT_LIB_PREFIX}DBus], [main],, have_qt_dbus=no)
512-
AC_CHECK_HEADER([QtDBus],, have_qt_dbus=no)
513-
QT_DBUS_LIBS="$LIBS"
514-
fi
515-
])
516-
CPPFLAGS="$TEMP_CPPFLAGS"
517-
CXXFLAGS="$TEMP_CXXFLAGS"
518-
LIBS="$TEMP_LIBS"
519-
])

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1139,7 +1139,7 @@ else
11391139
BITCOIN_QT_INIT
11401140

11411141
dnl sets $bitcoin_enable_qt, $bitcoin_enable_qt_test, $bitcoin_enable_qt_dbus
1142-
BITCOIN_QT_CONFIGURE([$use_pkgconfig])
1142+
BITCOIN_QT_CONFIGURE
11431143
fi
11441144

11451145
if test x$enable_wallet != xno; then

depends/config.site.in

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,6 @@ if test x@host_os@ = xdarwin; then
4949
PORT=no
5050
fi
5151

52-
if test x@host_os@ = xmingw32; then
53-
if test -z $with_qt_incdir; then
54-
with_qt_incdir=$depends_prefix/include
55-
fi
56-
if test -z $with_qt_libdir; then
57-
with_qt_libdir=$depends_prefix/lib
58-
fi
59-
fi
60-
6152
PATH=$depends_prefix/native/bin:$PATH
6253
PKG_CONFIG="`which pkg-config` --static"
6354

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,23 @@
11
--- old/qtbase/mkspecs/features/qt_module.prf
22
+++ new/qtbase/mkspecs/features/qt_module.prf
3-
@@ -245,7 +245,7 @@
3+
@@ -264,7 +264,7 @@
44
load(qt_targets)
55

66
# this builds on top of qt_common
77
-!internal_module:!lib_bundle:if(unix|mingw) {
8-
+unix|mingw {
8+
+if(unix|mingw):!if(darwin:debug_and_release:CONFIG(debug, debug|release)) {
99
CONFIG += create_pc
1010
QMAKE_PKGCONFIG_DESTDIR = pkgconfig
1111
host_build: \
12+
@@ -274,9 +274,9 @@
13+
QMAKE_PKGCONFIG_INCDIR = $$[QT_INSTALL_HEADERS/raw]
14+
QMAKE_PKGCONFIG_CFLAGS = -I${includedir}/$$MODULE_INCNAME
15+
QMAKE_PKGCONFIG_NAME = $$replace(TARGET, ^Qt, "Qt$$QT_MAJOR_VERSION ")
16+
- QMAKE_PKGCONFIG_FILE = $$replace(TARGET, ^Qt, Qt$$QT_MAJOR_VERSION)
17+
+ QMAKE_PKGCONFIG_FILE = $$replace(TARGET, ^Qt, Qt$$QT_MAJOR_VERSION)$$qtPlatformTargetSuffix()
18+
for(i, MODULE_DEPENDS): \
19+
- QMAKE_PKGCONFIG_REQUIRES += $$replace(QT.$${i}.name, ^Qt, Qt$$section(QT.$${i}.VERSION, ., 0, 0))
20+
+ QMAKE_PKGCONFIG_REQUIRES += $$replace(QT.$${i}.name, ^Qt, Qt$$section(QT.$${i}.VERSION, ., 0, 0))$$qtPlatformTargetSuffix()
21+
isEmpty(QMAKE_PKGCONFIG_DESCRIPTION): \
22+
QMAKE_PKGCONFIG_DESCRIPTION = $$replace(TARGET, ^Qt, "Qt ") module
23+
pclib_replace.match = $$lib_replace.match

0 commit comments

Comments
 (0)