configure: generalize command line overrides of library parameters
the outdated ones remain for backwards compatibility; some remain unchanged. Task-number: QTBUG-30083 Change-Id: Ia596b854d26b00fcb4f48df0da7ad893650ac1c8 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
This commit is contained in:
parent
aa88fe8417
commit
59a3abd1f1
@ -1,7 +1,10 @@
|
||||
Usage: configure [options] [assignments]
|
||||
|
||||
Configure understands variable assignments like VAR=value on the command line.
|
||||
The variables are mentioned in the descriptions of the options they relate to.
|
||||
Each uppercased library name (obtainable with -list-libraries) supports the
|
||||
suffixes _INCDIR, _LIBDIR, _PREFIX (INCDIR=PREFIX/include, LIBDIR=PREFIX/lib),
|
||||
_LIBS, and - on Windows and Darwin - _LIBS_DEBUG and _LIBS_RELEASE. E.g.,
|
||||
ICU_PREFIX=/opt/icu42 ICU_LIBS="-licui18n -licuuc -licudata".
|
||||
|
||||
It is also possible to manipulate any QMAKE_* variable, to amend the values
|
||||
from the mkspec for the build of Qt itself, e.g., QMAKE_CXXFLAGS+=-g3.
|
||||
@ -187,7 +190,6 @@ Component selection:
|
||||
[default on Android and Windows]
|
||||
-dbus-linked ......... Build Qt D-Bus and link to libdbus-1 [auto]
|
||||
-dbus-runtime ........ Build Qt D-Bus and dynamically load libdbus-1 [no]
|
||||
DBUS_PATH= DBUS_HOST_PATH=
|
||||
-accessibility ....... Enable accessibility support [yes]
|
||||
Note: Disabling accessibility is not recommended.
|
||||
-qml-debug ........... Enable QML debugging support [yes]
|
||||
@ -207,7 +209,6 @@ Core options:
|
||||
-pps ................. Enable PPS support [auto] (QNX only)
|
||||
-pcre ................ Select used libpcre3 [system/qt]
|
||||
-zlib ................ Select used zlib [system/qt]
|
||||
ZLIB_LIBS=
|
||||
|
||||
Logging backends:
|
||||
-journald .......... Enable journald support [no] (Unix only)
|
||||
@ -220,8 +221,6 @@ Network options:
|
||||
-no-openssl .......... Do not use OpenSSL [default on Apple and WinRT]
|
||||
-openssl-linked ...... Use OpenSSL and link to libssl [no]
|
||||
-openssl-runtime ..... Use OpenSSL and dynamically load libssl [auto]
|
||||
OPENSSL_PATH= OPENSSL_LIBS=, and on Windows also
|
||||
OPENSSL_LIBS_DEBUG= OPENSSL_LIBS_RELEASE=
|
||||
-securetransport ..... Use SecureTransport [auto] (Apple only)
|
||||
|
||||
-sctp ................ Enable SCTP support [no]
|
||||
@ -289,5 +288,4 @@ Database options:
|
||||
-sql-<driver> ........ Enable SQL <driver> plugin. Supported drivers:
|
||||
db2 ibase mysql oci odbc psql sqlite2 sqlite tds
|
||||
[all auto]
|
||||
MYSQL_PATH= PSQL_LIBS= SYBASE= SYBASE_LIBS=
|
||||
-sqlite .............. Select used sqlite3 [system/qt]
|
||||
|
@ -20,8 +20,7 @@
|
||||
"commandline": {
|
||||
"assignments": {
|
||||
"DBUS_HOST_PATH": "host_dbus.prefix",
|
||||
"DBUS_PATH": "dbus.prefix",
|
||||
"ZLIB_LIBS": "zlib.libs"
|
||||
"DBUS_PATH": "dbus.prefix"
|
||||
},
|
||||
"custom": "qmakeArgs",
|
||||
"options": {
|
||||
|
@ -401,6 +401,7 @@ defineReplace(qtConfPrepareArgs) {
|
||||
}
|
||||
|
||||
defineTest(qtConfSetupLibraries) {
|
||||
asspfx = $${currentConfig}.commandline.assignments
|
||||
for (l, $${currentConfig}.libraries._KEYS_) {
|
||||
lpfx = $${currentConfig}.libraries.$${l}
|
||||
# 'export' may be omitted, in which case it falls back to the library's name
|
||||
@ -439,9 +440,30 @@ defineTest(qtConfSetupLibraries) {
|
||||
$${currentConfig}.exports._KEYS_ = $$unique($${currentConfig}.exports._KEYS_)
|
||||
export($${currentConfig}.exports._KEYS_)
|
||||
|
||||
for (alias, $${currentConfig}.exports._KEYS_) {
|
||||
ua = $$upper($$alias)
|
||||
$${asspfx}._KEYS_ += \
|
||||
$${ua}_PREFIX $${ua}_INCDIR $${ua}_LIBDIR \
|
||||
$${ua}_LIBS $${ua}_LIBS_DEBUG $${ua}_LIBS_RELEASE
|
||||
uapfx = $${asspfx}.$${ua}
|
||||
$${uapfx}_PREFIX = $${alias}.prefix
|
||||
$${uapfx}_INCDIR = $${alias}.incdir
|
||||
$${uapfx}_LIBDIR = $${alias}.libdir
|
||||
$${uapfx}_LIBS = $${alias}.libs
|
||||
$${uapfx}_LIBS_DEBUG = $${alias}.libs.debug
|
||||
$${uapfx}_LIBS_RELEASE = $${alias}.libs.release
|
||||
export($${uapfx}_PREFIX)
|
||||
export($${uapfx}_INCDIR)
|
||||
export($${uapfx}_LIBDIR)
|
||||
export($${uapfx}_LIBS)
|
||||
export($${uapfx}_LIBS_DEBUG)
|
||||
export($${uapfx}_LIBS_RELEASE)
|
||||
}
|
||||
export($${asspfx}._KEYS_)
|
||||
|
||||
# reverse mapping for assignments on command line.
|
||||
for (a, $${currentConfig}.commandline.assignments._KEYS_) {
|
||||
apfx = $${currentConfig}.commandline.assignments.$${a}
|
||||
for (a, $${asspfx}._KEYS_) {
|
||||
apfx = $${asspfx}.$${a}
|
||||
ra = config.commandline.rev_assignments.$$eval($$apfx)
|
||||
$$ra = $$a
|
||||
export($$ra)
|
||||
@ -494,6 +516,18 @@ defineTest(qtConfLibrary_inline) {
|
||||
export($${1}.libs)
|
||||
}
|
||||
|
||||
incdir = $$val_escape(config.input.$${input}.incdir)
|
||||
!isEmpty(incdir) {
|
||||
$${1}.includedir = $$incdir
|
||||
export($${1}.includedir)
|
||||
}
|
||||
|
||||
libdir = $$val_escape(config.input.$${input}.libdir)
|
||||
!isEmpty(libdir) {
|
||||
$${1}.libs = "-L$$libdir $$eval($${1}.libs)"
|
||||
export($${1}.libs)
|
||||
}
|
||||
|
||||
return(true)
|
||||
}
|
||||
|
||||
|
@ -7,9 +7,6 @@
|
||||
|
||||
"commandline": {
|
||||
"assignments": {
|
||||
"OPENSSL_LIBS": "openssl.libs",
|
||||
"OPENSSL_LIBS_DEBUG": "openssl.libs.debug",
|
||||
"OPENSSL_LIBS_RELEASE": "openssl.libs.release",
|
||||
"OPENSSL_PATH": "openssl.prefix"
|
||||
},
|
||||
"options": {
|
||||
|
@ -8,7 +8,6 @@
|
||||
"commandline": {
|
||||
"assignments": {
|
||||
"MYSQL_PATH": "mysql.prefix",
|
||||
"PSQL_LIBS": "psql.libs",
|
||||
"SYBASE": "tds.prefix",
|
||||
"SYBASE_LIBS": "tds.libs"
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user