stop exporting the library versions
all users of this functionality have been removed, and not emitting the
version info saves quite some noise from the generated files.
the reason why the users have been removed is that it was unreliable in
the first place: if a dependency is found without pkg-config, no version
information would be available.
the extraction of the version via pkg-config itself is kept in place, as
configure tests could be potentially optimized by utilizing it.
this reverts much of commit 48b4e0bf6f
.
Change-Id: I01917f3b2a56b747d7cc54955141d20d23d0990a
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
This commit is contained in:
parent
14fed674ae
commit
7c1d640c0c
@ -557,18 +557,6 @@ defineReplace(qtConfLibraryArgs) {
|
||||
return($$qmake_args)
|
||||
}
|
||||
|
||||
defineReplace(qtConfGetHexVersion) {
|
||||
version = $$split(1, '.')
|
||||
number =
|
||||
for(i, 0..2) {
|
||||
n = $$member(version, $$i)
|
||||
isEmpty(n): n = 0
|
||||
number += $$format_number($$n, obase=16 zeropad width=2)
|
||||
}
|
||||
number = "0x$$join(number)"
|
||||
return($$number)
|
||||
}
|
||||
|
||||
defineTest(qtConfExportLibrary) {
|
||||
isEmpty(2): return()
|
||||
!$$qtConfEvaluate($$eval($${1}.export)): return()
|
||||
@ -578,7 +566,6 @@ defineTest(qtConfExportLibrary) {
|
||||
eval(libs = $$eval($${1}.libs))
|
||||
eval(cflags = $$eval($${1}.cflags))
|
||||
eval(includes = $$eval($${1}.includedir))
|
||||
version = $$eval($${1}.version)
|
||||
|
||||
# Split $$cflags into stuff that goes into DEFINES, INCLUDEPATH, and other stuff.
|
||||
defines =
|
||||
@ -606,14 +593,6 @@ defineTest(qtConfExportLibrary) {
|
||||
$$eval($${1}.builds.$${b}))
|
||||
!isEmpty(defines): qtConfOutputVar(assign, $$output, QMAKE_DEFINES_$$NAME, $$defines)
|
||||
!isEmpty(includes): qtConfOutputVar(assign, $$output, QMAKE_INCDIR_$$NAME, $$includes)
|
||||
!isEmpty(version) {
|
||||
qtConfOutputVar(assign, $$output, QMAKE_$${NAME}_VERSION, $$version)
|
||||
qtConfOutputSetDefine("privateHeader", "QT_LIBRARY_VERSION_$${2}", $$qtConfGetHexVersion($$version))
|
||||
version = $$split(version, '.')
|
||||
qtConfOutputVar(assign, $$output, QMAKE_$${NAME}_VERSION_MAJOR, $$member(version, 0))
|
||||
qtConfOutputVar(assign, $$output, QMAKE_$${NAME}_VERSION_MINOR, $$member(version, 1))
|
||||
qtConfOutputVar(assign, $$output, QMAKE_$${NAME}_VERSION_PATCH, $$member(version, 2))
|
||||
}
|
||||
!isEmpty($${currentConfig}.module): \
|
||||
qtConfExtendVar($$output, "QT.$${currentModule}_private.libraries", $$2)
|
||||
}
|
||||
|
@ -57,8 +57,7 @@ defineReplace(qtExportLibsForModule) {
|
||||
NAME = $$upper($$lib)
|
||||
vars = \
|
||||
QMAKE_LIBS_$$NAME QMAKE_LIBS_$${NAME}_DEBUG QMAKE_LIBS_$${NAME}_RELEASE \
|
||||
QMAKE_DEFINES_$$NAME QMAKE_INCDIR_$$NAME QMAKE_$${NAME}_VERSION \
|
||||
QMAKE_$${NAME}_VERSION_MAJOR QMAKE_$${NAME}_VERSION_MINOR QMAKE_$${NAME}_VERSION_PATCH
|
||||
QMAKE_DEFINES_$$NAME QMAKE_INCDIR_$$NAME
|
||||
for (var, vars) {
|
||||
!isEmpty($$var): \
|
||||
result += "$$var = $$val_escape($$var)"
|
||||
|
@ -53,10 +53,5 @@
|
||||
#include <QtCore/private/qtcore-config_p.h>
|
||||
#endif
|
||||
|
||||
#define QT_LIBRARY_VERSION(lib) QT_LIBRARY_VERSION_##lib
|
||||
#define QT_LIBRARY_VERSION_MAJOR(lib) (QT_LIBRARY_VERSION_##lib >> 16)
|
||||
#define QT_LIBRARY_VERSION_MINOR(lib) ((QT_LIBRARY_VERSION_##lib >> 8) & 0xff)
|
||||
#define QT_LIBRARY_VERSION_PATCH(lib) (QT_LIBRARY_VERSION_##lib & 0xff)
|
||||
|
||||
#endif // QGLOBAL_P_H
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user