summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@qt.io>2017-02-08 21:22:08 +0100
committerOswald Buddenhagen <oswald.buddenhagen@qt.io>2017-02-22 07:46:25 +0000
commit59a3abd1f1429eef19e178e880070c3c1d902fba (patch)
tree2d027efd86a3c73d804af2b79e198446e31596e0
parentaa88fe8417eb78944b48b5855024e558b4a0f0a5 (diff)
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>
-rw-r--r--config_help.txt10
-rw-r--r--configure.json3
-rw-r--r--mkspecs/features/qt_configure.prf38
-rw-r--r--src/network/configure.json3
-rw-r--r--src/sql/configure.json1
5 files changed, 41 insertions, 14 deletions
diff --git a/config_help.txt b/config_help.txt
index fb3b2225c6..f48b9eaed4 100644
--- a/config_help.txt
+++ b/config_help.txt
@@ -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]
diff --git a/configure.json b/configure.json
index c69c2ac0f8..d12b4d4fc3 100644
--- a/configure.json
+++ b/configure.json
@@ -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": {
diff --git a/mkspecs/features/qt_configure.prf b/mkspecs/features/qt_configure.prf
index 1f8439a81d..82b97657d9 100644
--- a/mkspecs/features/qt_configure.prf
+++ b/mkspecs/features/qt_configure.prf
@@ -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)
}
diff --git a/src/network/configure.json b/src/network/configure.json
index c9077c8968..7bd3f6164a 100644
--- a/src/network/configure.json
+++ b/src/network/configure.json
@@ -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": {
diff --git a/src/sql/configure.json b/src/sql/configure.json
index 72671b6df9..4c24d1913b 100644
--- a/src/sql/configure.json
+++ b/src/sql/configure.json
@@ -8,7 +8,6 @@
"commandline": {
"assignments": {
"MYSQL_PATH": "mysql.prefix",
- "PSQL_LIBS": "psql.libs",
"SYBASE": "tds.prefix",
"SYBASE_LIBS": "tds.libs"
},