Pass target and host mkspec as defines to QMakeLibraryInfo
Change-Id: If07055286496c507310c0dbb3a06f1a42d643596 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
parent
c651e7ba18
commit
3c12ab974f
@ -57,8 +57,6 @@ function(qt_generate_qconfig_cpp in_file out_file)
|
|||||||
qt_add_string_to_qconfig_cpp("${INSTALL_LIBEXECDIR}")
|
qt_add_string_to_qconfig_cpp("${INSTALL_LIBEXECDIR}")
|
||||||
qt_add_string_to_qconfig_cpp("${INSTALL_LIBDIR}")
|
qt_add_string_to_qconfig_cpp("${INSTALL_LIBDIR}")
|
||||||
qt_add_string_to_qconfig_cpp("${hostdatadir}")
|
qt_add_string_to_qconfig_cpp("${hostdatadir}")
|
||||||
qt_add_string_to_qconfig_cpp("${QT_QMAKE_TARGET_MKSPEC}")
|
|
||||||
qt_add_string_to_qconfig_cpp("${QT_QMAKE_HOST_MKSPEC}")
|
|
||||||
|
|
||||||
# Save second part.
|
# Save second part.
|
||||||
set(QT_CONFIG_STR_OFFSETS_SECOND "${QT_CONFIG_STR_OFFSETS}")
|
set(QT_CONFIG_STR_OFFSETS_SECOND "${QT_CONFIG_STR_OFFSETS}")
|
||||||
|
@ -57,6 +57,8 @@ qt_internal_add_tool(${target_name}
|
|||||||
QT_VERSION_MAJOR=${PROJECT_VERSION_MAJOR} # special case
|
QT_VERSION_MAJOR=${PROJECT_VERSION_MAJOR} # special case
|
||||||
QT_VERSION_MINOR=${PROJECT_VERSION_MINOR} # special case
|
QT_VERSION_MINOR=${PROJECT_VERSION_MINOR} # special case
|
||||||
QT_VERSION_PATCH=${PROJECT_VERSION_PATCH} # special case
|
QT_VERSION_PATCH=${PROJECT_VERSION_PATCH} # special case
|
||||||
|
QT_HOST_MKSPEC="${QT_QMAKE_HOST_MKSPEC}"
|
||||||
|
QT_TARGET_MKSPEC="${QT_QMAKE_TARGET_MKSPEC}"
|
||||||
INCLUDE_DIRECTORIES
|
INCLUDE_DIRECTORIES
|
||||||
generators
|
generators
|
||||||
generators/mac
|
generators/mac
|
||||||
|
@ -163,6 +163,10 @@ static LocationInfo defaultLocationInfo(int loc)
|
|||||||
result.key = QStringLiteral("Sysroot");
|
result.key = QStringLiteral("Sysroot");
|
||||||
} else if (loc == QMakeLibraryInfo::SysrootifyPrefixPath) {
|
} else if (loc == QMakeLibraryInfo::SysrootifyPrefixPath) {
|
||||||
result.key = QStringLiteral("SysrootifyPrefix");
|
result.key = QStringLiteral("SysrootifyPrefix");
|
||||||
|
} else if (loc == QMakeLibraryInfo::TargetSpecPath) {
|
||||||
|
result.key = QStringLiteral("TargetSpec");
|
||||||
|
} else if (loc == QMakeLibraryInfo::HostSpecPath) {
|
||||||
|
result.key = QStringLiteral("HostSpec");
|
||||||
} else if (unsigned(loc) < sizeof(qtConfEntries) / sizeof(qtConfEntries[0])) {
|
} else if (unsigned(loc) < sizeof(qtConfEntries) / sizeof(qtConfEntries[0])) {
|
||||||
result.key = QLatin1String(qtConfEntries[loc].key);
|
result.key = QLatin1String(qtConfEntries[loc].key);
|
||||||
result.defaultValue = QLatin1String(qtConfEntries[loc].value);
|
result.defaultValue = QLatin1String(qtConfEntries[loc].value);
|
||||||
@ -192,6 +196,10 @@ static QString storedPath(int loc)
|
|||||||
// empty result
|
// empty result
|
||||||
} else if (loc == QMakeLibraryInfo::SysrootifyPrefixPath) {
|
} else if (loc == QMakeLibraryInfo::SysrootifyPrefixPath) {
|
||||||
result = QStringLiteral("false");
|
result = QStringLiteral("false");
|
||||||
|
} else if (loc == QMakeLibraryInfo::TargetSpecPath) {
|
||||||
|
result = QT_TARGET_MKSPEC;
|
||||||
|
} else if (loc == QMakeLibraryInfo::HostSpecPath) {
|
||||||
|
result = QT_HOST_MKSPEC;
|
||||||
} else if (unsigned(loc)
|
} else if (unsigned(loc)
|
||||||
<= sizeof(qt_configure_str_offsets) / sizeof(qt_configure_str_offsets[0])) {
|
<= sizeof(qt_configure_str_offsets) / sizeof(qt_configure_str_offsets[0])) {
|
||||||
path = qt_configure_strs + qt_configure_str_offsets[loc - 1];
|
path = qt_configure_strs + qt_configure_str_offsets[loc - 1];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user