summaryrefslogtreecommitdiffstats
path: root/configure.pri
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@qt.io>2017-01-03 16:40:30 +0100
committerOswald Buddenhagen <oswald.buddenhagen@qt.io>2017-01-06 20:09:08 +0000
commit52d64fca662d0e488801fc40dffdc0a732cfdbd5 (patch)
treef50f35fa5df16dca9e43ac95d23cb7c39422dd5d /configure.pri
parent17b6967f6811cb3adeb8c7eb79a422d2c10ee0d1 (diff)
revert to building qmake with qconfig.cpp
turns out that just appending builtin-qt.conf isn't a good idea: executable-editing tools (objcopy, prelink, etc.) will happily drop the "attachment". a safe method would be adding a proper section to the executable, but there doesn't appear to be an objcopy equivalent in msvc, and using entirely different methods of embedding the file with different toolchains seems like a rather bad idea. so instead go back to the old method of building qmake with a generated qconfig.cpp. of course, as said file is now created by qmake itself, we have to compile qlibraryinfo.cpp a second time, and link a second qmake executable. Task-number: QTBUG-57803 Change-Id: I9e232693550aa870cec154e49cc06add13017cc2 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'configure.pri')
-rw-r--r--configure.pri48
1 files changed, 32 insertions, 16 deletions
diff --git a/configure.pri b/configure.pri
index 3f9a7e208c..b184ceff5b 100644
--- a/configure.pri
+++ b/configure.pri
@@ -748,40 +748,56 @@ defineTest(qtConfOutput_preparePaths) {
addConfStr($$config.rel_input.examplesdir)
addConfStr($$config.rel_input.testsdir)
+ QT_CONFIGURE_STR_OFFSETS_ALL = $$QT_CONFIGURE_STR_OFFSETS
+ QT_CONFIGURE_STRS_ALL = $$QT_CONFIGURE_STRS
+ QT_CONFIGURE_STR_OFFSETS =
+ QT_CONFIGURE_STRS =
+
+ addConfStr($$config.input.sysroot)
+ addConfStr($$qmake_sysrootify)
+ addConfStr($$config.rel_input.hostbindir)
+ addConfStr($$config.rel_input.hostlibdir)
+ addConfStr($$config.rel_input.hostdatadir)
+ addConfStr($$XSPEC)
+ addConfStr($$[QMAKE_SPEC])
+
$${currentConfig}.output.qconfigSource = \
"/* Installation date */" \
"static const char qt_configure_installation [12+11] = \"qt_instdate=2012-12-20\";" \
"" \
"/* Installation Info */" \
"static const char qt_configure_prefix_path_str [12+256] = \"qt_prfxpath=$$config.input.prefix\";" \
+ "$${LITERAL_HASH}ifdef QT_BUILD_QMAKE" \
+ "static const char qt_configure_ext_prefix_path_str [12+256] = \"qt_epfxpath=$$config.input.extprefix\";" \
+ "static const char qt_configure_host_prefix_path_str [12+256] = \"qt_hpfxpath=$$config.input.hostprefix\";" \
+ "$${LITERAL_HASH}endif" \
"" \
"static const short qt_configure_str_offsets[] = {" \
+ $$QT_CONFIGURE_STR_OFFSETS_ALL \
+ "$${LITERAL_HASH}ifdef QT_BUILD_QMAKE" \
$$QT_CONFIGURE_STR_OFFSETS \
+ "$${LITERAL_HASH}endif" \
"};" \
"static const char qt_configure_strs[] =" \
+ $$QT_CONFIGURE_STRS_ALL \
+ "$${LITERAL_HASH}ifdef QT_BUILD_QMAKE" \
$$QT_CONFIGURE_STRS \
+ "$${LITERAL_HASH}endif" \
";" \
"" \
"$${LITERAL_HASH}define QT_CONFIGURE_SETTINGS_PATH \"$$config.rel_input.sysconfdir\"" \
"" \
- "$${LITERAL_HASH}define QT_CONFIGURE_PREFIX_PATH qt_configure_prefix_path_str + 12"
+ "$${LITERAL_HASH}ifdef QT_BUILD_QMAKE" \
+ "$${LITERAL_HASH} define QT_CONFIGURE_SYSROOTIFY_PREFIX $$qmake_sysrootify" \
+ "$${LITERAL_HASH}endif" \
+ "" \
+ "$${LITERAL_HASH}define QT_CONFIGURE_PREFIX_PATH qt_configure_prefix_path_str + 12" \
+ "$${LITERAL_HASH}ifdef QT_BUILD_QMAKE" \
+ "$${LITERAL_HASH} define QT_CONFIGURE_EXT_PREFIX_PATH qt_configure_ext_prefix_path_str + 12" \
+ "$${LITERAL_HASH} define QT_CONFIGURE_HOST_PREFIX_PATH qt_configure_host_prefix_path_str + 12" \
+ "$${LITERAL_HASH}endif"
export($${currentConfig}.output.qconfigSource)
- # populate qmake/builtin-qt.conf
-
- $${currentConfig}.output.builtinQtConf = \
- " " \
- "===========================================================" \
- "==================== qt.conf beginning ====================" \
- "===========================================================" \
- "[Paths]" \
- "ExtPrefix=$$config.input.extprefix" \
- "Prefix=$$config.input.prefix" \
- $$printInstallPaths() \
- "Settings=$$config.rel_input.sysconfdir" \
- $$printHostPaths()
- export($${currentConfig}.output.builtinQtConf)
-
# create bin/qt.conf. this doesn't use the regular file output
# mechanism, as the file is relied upon by configure tests.