summaryrefslogtreecommitdiffstats
path: root/configure.pri
diff options
context:
space:
mode:
Diffstat (limited to 'configure.pri')
-rw-r--r--configure.pri61
1 files changed, 57 insertions, 4 deletions
diff --git a/configure.pri b/configure.pri
index 6e7f6b76a4..b3b3e27c44 100644
--- a/configure.pri
+++ b/configure.pri
@@ -68,7 +68,7 @@ defineReplace(qtConfFunc_crossCompile) {
}
defineReplace(qtConfFunc_licenseCheck) {
- exists($$QT_SOURCE_TREE/LICENSE.LGPL3)|exists($$QT_SOURCE_TREE/LICENSE.GPL2): \
+ exists($$QT_SOURCE_TREE/LICENSE.LGPL3)|exists($$QT_SOURCE_TREE/LICENSE.GPL2)|exists($$QT_SOURCE_TREE/LICENSE.GPL3): \
hasOpenSource = true
else: \
hasOpenSource = false
@@ -106,8 +106,7 @@ defineReplace(qtConfFunc_licenseCheck) {
}
} else {
!$$hasCommercial: \
- qtConfFatalError("No license files and no licheck executables found." \
- "Cannot proceed. Try re-installing Qt.")
+ qtConfFatalError("No license files. Cannot proceed. Try re-installing Qt.")
commercial = yes
}
}
@@ -187,8 +186,13 @@ defineReplace(qtConfFunc_licenseCheck) {
theLicense = "GNU Lesser General Public License (LGPL) version 3"
showWhat = "Type 'L' to view the GNU Lesser General Public License version 3 (LGPLv3)."
gpl2Ok = false
+ gpl3Ok = false
winrt {
notTheLicense = "Note: GPL version 2 is not available on WinRT."
+ } else: wasm {
+ gpl3Ok = true
+ theLicense = "GNU General Public License (GPL) version 3"
+ showWhat = "Type 'G' to view the GNU General Public License version 3 (GPLv3)."
} else: $$qtConfEvaluate("features.android-style-assets") {
notTheLicense = "Note: GPL version 2 is not available due to using Android style assets."
} else {
@@ -230,6 +234,8 @@ defineReplace(qtConfFunc_licenseCheck) {
licenseFile = $$QT_SOURCE_TREE/LICENSE.LGPL3
} else: equals(commercial, no):equals(val, g):$$gpl2Ok {
licenseFile = $$QT_SOURCE_TREE/LICENSE.GPL2
+ } else: equals(commercial, no):equals(val, g):$$gpl3Ok {
+ licenseFile = $$QT_SOURCE_TREE/LICENSE.GPL3
} else {
next()
}
@@ -251,6 +257,11 @@ defineTest(qtConfTest_machineTuple) {
return(true)
}
+defineTest(qtConfTest_verifySpec) {
+ qtConfTest_compile($$1): return(true)
+ qtConfFatalError("Cannot compile a minimal program. The toolchain or QMakeSpec is broken.", log)
+}
+
defineTest(qtConfTest_architecture) {
!qtConfTest_compile($${1}): \
error("Could not determine $$eval($${1}.label). See config.log for details.")
@@ -263,6 +274,8 @@ defineTest(qtConfTest_architecture) {
content = $$cat($$test_out_dir/arch.exe, blob)
else: android:exists($$test_out_dir/libarch.so): \
content = $$cat($$test_out_dir/libarch.so, blob)
+ else: wasm:exists($$test_out_dir/arch.wasm): \
+ content = $$cat($$test_out_dir/arch.wasm, blob)
else: \
error("$$eval($${1}.label) detection binary not found.")
@@ -412,7 +425,7 @@ defineTest(qtConfTest_x86SimdAlways) {
qtConfCheckFeature($$f)
equals($${fpfx}.$${f}.available, true): configs += $$f
}
- $${1}.literal_args = $$system_quote(SIMD=$$join(configs, " "))
+ $${1}.literal_args = SIMD=$$join(configs, " ")
qtConfTest_compile($${1})
}
@@ -590,6 +603,9 @@ defineTest(qtConfOutput_prepareOptions) {
target_arch = armeabi-v7a
platform = $$eval(config.input.android-ndk-platform)
+ isEmpty(platform): equals(target_arch, arm64-v8a): \
+ platform = android-21
+
isEmpty(platform): \
platform = android-16 ### the windows configure disagrees ...
@@ -1141,6 +1157,12 @@ defineReplace(qtConfOutputPostProcess_publicPro) {
"QT_ICC_MINOR_VERSION = $$format_number($$replace(QMAKE_ICC_VER, "(..)(..)", "\\2"))" \
"QT_ICC_PATCH_VERSION = $$QMAKE_ICC_UPDATE_VER"
}
+ !isEmpty(QMAKE_GHS_VERSION) {
+ output += \
+ "QT_GHS_MAJOR_VERSION = $$replace(QMAKE_GHS_VERSION, "(.*)(.)(.)", "\\1")" \
+ "QT_GHS_MINOR_VERSION = $$replace(QMAKE_GHS_VERSION, "(.*)(.)(.)", "\\2")" \
+ "QT_GHS_PATCH_VERSION = $$replace(QMAKE_GHS_VERSION, "(.*)(.)(.)", "\\3")"
+ }
output += "QT_EDITION = $$config.input.qt_edition"
!contains(config.input.qt_edition, "(OpenSource|Preview)") {
@@ -1198,13 +1220,43 @@ defineReplace(qtConfReportArch) {
return("$$arch, CPU features: $$subarch")
}
+defineReplace(qtConfReportCompiler) {
+ clang_cl: {
+ return("clang-cl $${QMAKE_CLANG_MAJOR_VERSION}.$${QMAKE_CLANG_MINOR_VERSION}.$${QMAKE_CLANG_PATCH_VERSION}")
+ } else: clang {
+ !isEmpty(QMAKE_APPLE_CLANG_MAJOR_VERSION) {
+ return("clang (Apple) $${QMAKE_APPLE_CLANG_MAJOR_VERSION}.$${QMAKE_APPLE_CLANG_MINOR_VERSION}.$${QMAKE_APPLE_CLANG_PATCH_VERSION}")
+ } else {
+ return("clang $${QMAKE_CLANG_MAJOR_VERSION}.$${QMAKE_CLANG_MINOR_VERSION}.$${QMAKE_CLANG_PATCH_VERSION}")
+ }
+ } else: intel_icc {
+ return("intel_icc $$QMAKE_ICC_VER")
+ } else: intel_icl {
+ return("intel_icl $$QMAKE_ICC_VER")
+ } else: rim_qcc {
+ return("rim_qcc $${QMAKE_GCC_MAJOR_VERSION}.$${QMAKE_GCC_MINOR_VERSION}.$${QMAKE_GCC_PATCH_VERSION}")
+ } else: gcc {
+ return("gcc $${QMAKE_GCC_MAJOR_VERSION}.$${QMAKE_GCC_MINOR_VERSION}.$${QMAKE_GCC_PATCH_VERSION}")
+ } else: msvc {
+ return("msvc $$QMAKE_MSC_FULL_VER")
+ } else: ghs {
+ return("ghs $$QMAKE_GHS_VERSION")
+ } else {
+ return("unknown ($$QMAKE_COMPILER)")
+ }
+}
+
+
defineTest(qtConfReport_buildTypeAndConfig) {
!$$qtConfEvaluate("features.cross_compile") {
qtConfAddReport("Build type: $$[QMAKE_SPEC] ($$qtConfReportArch(architecture))")
+ qtConfAddReport("Compiler: $$qtConfReportCompiler()")
} else {
qtConfAddReport("Building on: $$[QMAKE_SPEC] ($$qtConfReportArch(host_architecture))")
qtConfAddReport("Building for: $$[QMAKE_XSPEC] ($$qtConfReportArch(architecture))")
+ qtConfAddReport("Target compiler: $$qtConfReportCompiler()")
}
+
qtConfAddReport()
qtConfAddReport("Configuration: $$eval($${currentConfig}.output.privatePro.append.CONFIG) $$eval($${currentConfig}.output.publicPro.append.QT_CONFIG)")
qtConfAddReport()
@@ -1250,6 +1302,7 @@ defineTest(createConfigStatus) {
cont = \
"$$system_quote($$system_path($$cfg)$$ext) -redo %*"
} else {
+ !contains(cfg, .*/.*): cfg = ./$$cfg
cont = \
"$${LITERAL_HASH}!/bin/sh" \
"exec $$system_quote($$cfg) -redo \"$@\""