revamp -sysroot and -hostprefix handling
instead of being a variable added to the makespec (via qconfig.pri), QT_SYSROOT is now a property. the QT_INSTALL_... properties are now automatically prefixed with the sysroot; the raw values are available as QT_RAW_INSTALL_... - this is expected to cause the least migration effort for existing projects. -hostprefix and the new -hostbindir & -hostdatadir now feed the new QT_HOST_... properties. adapted the qmake feature files and the qtbase build system accordingly. Change-Id: Iaa9b65bc10d9fe9c4988d620c70a8ce72177f8d4 Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
This commit is contained in:
parent
c0e9041b6d
commit
012f799254
103
configure
vendored
103
configure
vendored
@ -825,7 +825,10 @@ QT_INSTALL_TRANSLATIONS=
|
|||||||
QT_INSTALL_SETTINGS=
|
QT_INSTALL_SETTINGS=
|
||||||
QT_INSTALL_EXAMPLES=
|
QT_INSTALL_EXAMPLES=
|
||||||
QT_INSTALL_TESTS=
|
QT_INSTALL_TESTS=
|
||||||
|
CFG_SYSROOT=
|
||||||
QT_HOST_PREFIX=
|
QT_HOST_PREFIX=
|
||||||
|
QT_HOST_BINS=
|
||||||
|
QT_HOST_DATA=
|
||||||
|
|
||||||
#flags for SQL drivers
|
#flags for SQL drivers
|
||||||
QT_CFLAGS_PSQL=
|
QT_CFLAGS_PSQL=
|
||||||
@ -978,7 +981,7 @@ while [ "$#" -gt 0 ]; do
|
|||||||
shift
|
shift
|
||||||
VAL=$1
|
VAL=$1
|
||||||
;;
|
;;
|
||||||
-prefix|-docdir|-headerdir|-plugindir|-importdir|-datadir|-libdir|-bindir|-translationdir|-sysconfdir|-examplesdir|-testsdir|-depths|-make|-nomake|-platform|-xplatform|-sdk|-arch|-host-arch|-mysql_config|-sysroot)
|
-prefix|-docdir|-headerdir|-plugindir|-importdir|-datadir|-libdir|-bindir|-translationdir|-sysconfdir|-examplesdir|-testsdir|-depths|-make|-nomake|-platform|-xplatform|-sdk|-arch|-host-arch|-mysql_config|-sysroot|-hostdatadir|-hostbindir)
|
||||||
VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
|
VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
|
||||||
shift
|
shift
|
||||||
VAL="$1"
|
VAL="$1"
|
||||||
@ -1169,6 +1172,12 @@ while [ "$#" -gt 0 ]; do
|
|||||||
hostprefix)
|
hostprefix)
|
||||||
QT_HOST_PREFIX="$VAL"
|
QT_HOST_PREFIX="$VAL"
|
||||||
;;
|
;;
|
||||||
|
hostdatadir)
|
||||||
|
QT_HOST_DATA="$VAL"
|
||||||
|
;;
|
||||||
|
hostbindir)
|
||||||
|
QT_HOST_BINS="$VAL"
|
||||||
|
;;
|
||||||
force-pkg-config)
|
force-pkg-config)
|
||||||
QT_FORCE_PKGCONFIG=yes
|
QT_FORCE_PKGCONFIG=yes
|
||||||
;;
|
;;
|
||||||
@ -3116,6 +3125,40 @@ if [ -z "$QT_INSTALL_TESTS" ]; then #default
|
|||||||
fi
|
fi
|
||||||
QT_INSTALL_TESTS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TESTS"`
|
QT_INSTALL_TESTS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TESTS"`
|
||||||
|
|
||||||
|
#------- host paths --------
|
||||||
|
|
||||||
|
if [ -z "$QT_HOST_PREFIX" ]; then
|
||||||
|
QT_HOST_PREFIX=$QT_INSTALL_PREFIX
|
||||||
|
haveHpx=false
|
||||||
|
else
|
||||||
|
QT_HOST_PREFIX=`"$relpath/config.tests/unix/makeabs" "$QT_HOST_PREFIX"`
|
||||||
|
haveHpx=true
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$QT_HOST_BINS" ]; then #default
|
||||||
|
if $haveHpx; then
|
||||||
|
if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
|
||||||
|
if [ "$BUILD_ON_MAC" = "yes" ]; then
|
||||||
|
QT_HOST_BINS="/Developer/Applications/Qt"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
[ -z "$QT_HOST_BINS" ] && QT_HOST_BINS="$QT_HOST_PREFIX/bin" #fallback
|
||||||
|
else
|
||||||
|
QT_HOST_BINS="$QT_INSTALL_BINS"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
QT_HOST_BINS=`"$relpath/config.tests/unix/makeabs" "$QT_HOST_BINS"`
|
||||||
|
|
||||||
|
if [ -z "$QT_HOST_DATA" ]; then #default
|
||||||
|
if $haveHpx; then
|
||||||
|
QT_HOST_DATA="$QT_HOST_PREFIX"
|
||||||
|
else
|
||||||
|
QT_HOST_DATA="$QT_INSTALL_DATA"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
QT_HOST_DATA=`"$relpath/config.tests/unix/makeabs" "$QT_HOST_DATA"`
|
||||||
|
fi
|
||||||
|
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
# help - interactive parts of the script _after_ this section please
|
# help - interactive parts of the script _after_ this section please
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
@ -3233,6 +3276,7 @@ cat <<EOF
|
|||||||
-hostprefix [dir] .. Tools and libraries needed when developing
|
-hostprefix [dir] .. Tools and libraries needed when developing
|
||||||
applications are installed in [dir]. If [dir] is
|
applications are installed in [dir]. If [dir] is
|
||||||
not given, the current build directory will be used.
|
not given, the current build directory will be used.
|
||||||
|
(default PREFIX)
|
||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
@ -3269,6 +3313,17 @@ cat <<EOF
|
|||||||
(default PREFIX/examples)
|
(default PREFIX/examples)
|
||||||
-testsdir <dir> ....... Tests will be installed to <dir>
|
-testsdir <dir> ....... Tests will be installed to <dir>
|
||||||
(default PREFIX/tests)
|
(default PREFIX/tests)
|
||||||
|
EOF
|
||||||
|
if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
|
||||||
|
cat <<EOF
|
||||||
|
|
||||||
|
-hostbindir <dir> .. Host executables will be installed to <dir>
|
||||||
|
(default HOSTPREFIX/bin)
|
||||||
|
-hostdatadir <dir> . Data used by qmake will be installed to <dir>
|
||||||
|
(default HOSTPREFIX)
|
||||||
|
EOF
|
||||||
|
fi
|
||||||
|
cat <<EOF
|
||||||
|
|
||||||
Configure options:
|
Configure options:
|
||||||
|
|
||||||
@ -3987,33 +4042,7 @@ static const char qt_configure_licensed_products_str [256 + 12] = "qt_lcnsprod=$
|
|||||||
|
|
||||||
/* Installation date */
|
/* Installation date */
|
||||||
static const char qt_configure_installation [12+11] = "qt_instdate=`date +%Y-%m-%d`";
|
static const char qt_configure_installation [12+11] = "qt_instdate=`date +%Y-%m-%d`";
|
||||||
EOF
|
|
||||||
|
|
||||||
|
|
||||||
if [ ! -z "$QT_HOST_PREFIX" ]; then
|
|
||||||
cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
|
|
||||||
|
|
||||||
#if defined(QT_BOOTSTRAPPED) || defined(QT_BUILD_QMAKE)
|
|
||||||
/* Installation Info */
|
|
||||||
static const char qt_configure_prefix_path_strs[][256 + 12] = {
|
|
||||||
"qt_prfxpath=$QT_HOST_PREFIX",
|
|
||||||
"qt_docspath=$QT_HOST_PREFIX/doc",
|
|
||||||
"qt_hdrspath=$QT_HOST_PREFIX/include",
|
|
||||||
"qt_libspath=$QT_HOST_PREFIX/lib",
|
|
||||||
"qt_binspath=$QT_HOST_PREFIX/bin",
|
|
||||||
"qt_plugpath=$QT_HOST_PREFIX/plugins",
|
|
||||||
"qt_impspath=$QT_HOST_PREFIX/IMPORTS",
|
|
||||||
"qt_datapath=$QT_HOST_PREFIX",
|
|
||||||
"qt_trnspath=$QT_HOST_PREFIX/translations",
|
|
||||||
"qt_xmplpath=$QT_INSTALL_EXAMPLES",
|
|
||||||
"qt_tstspath=$QT_INSTALL_TESTS",
|
|
||||||
};
|
|
||||||
static const char qt_configure_settings_path_str[256 + 12] = "qt_stngpath=$QT_INSTALL_SETTINGS";
|
|
||||||
#else // QT_BOOTSTRAPPED
|
|
||||||
EOF
|
|
||||||
fi
|
|
||||||
|
|
||||||
cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
|
|
||||||
/* Installation Info */
|
/* Installation Info */
|
||||||
static const char qt_configure_prefix_path_strs[][256 + 12] = {
|
static const char qt_configure_prefix_path_strs[][256 + 12] = {
|
||||||
"qt_prfxpath=$QT_INSTALL_PREFIX",
|
"qt_prfxpath=$QT_INSTALL_PREFIX",
|
||||||
@ -4027,17 +4056,16 @@ static const char qt_configure_prefix_path_strs[][256 + 12] = {
|
|||||||
"qt_trnspath=$QT_INSTALL_TRANSLATIONS",
|
"qt_trnspath=$QT_INSTALL_TRANSLATIONS",
|
||||||
"qt_xmplpath=$QT_INSTALL_EXAMPLES",
|
"qt_xmplpath=$QT_INSTALL_EXAMPLES",
|
||||||
"qt_tstspath=$QT_INSTALL_TESTS",
|
"qt_tstspath=$QT_INSTALL_TESTS",
|
||||||
|
#ifdef QT_BUILD_QMAKE
|
||||||
|
"qt_ssrtpath=$CFG_SYSROOT",
|
||||||
|
"qt_hpfxpath=$QT_HOST_PREFIX",
|
||||||
|
"qt_hbinpath=$QT_HOST_BINS",
|
||||||
|
"qt_hdatpath=$QT_HOST_DATA",
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
static const char qt_configure_settings_path_str[256 + 12] = "qt_stngpath=$QT_INSTALL_SETTINGS";
|
static const char qt_configure_settings_path_str[256 + 12] = "qt_stngpath=$QT_INSTALL_SETTINGS";
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
if [ ! -z "$QT_HOST_PREFIX" ]; then
|
|
||||||
cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
|
|
||||||
#endif // QT_BOOTSTRAPPED
|
|
||||||
|
|
||||||
EOF
|
|
||||||
fi
|
|
||||||
|
|
||||||
cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
|
cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
|
||||||
|
|
||||||
/* strlen( "qt_lcnsxxxx" ) == 12 */
|
/* strlen( "qt_lcnsxxxx" ) == 12 */
|
||||||
@ -6781,10 +6809,9 @@ EOF
|
|||||||
if [ -n "$CFG_SYSROOT" ]; then
|
if [ -n "$CFG_SYSROOT" ]; then
|
||||||
echo "# sysroot" >>"$QTCONFIG.tmp"
|
echo "# sysroot" >>"$QTCONFIG.tmp"
|
||||||
echo `basename "$XQMAKESPEC"` \{ >>"$QTCONFIG.tmp"
|
echo `basename "$XQMAKESPEC"` \{ >>"$QTCONFIG.tmp"
|
||||||
echo " QT_SYSROOT += \$\$quote($CFG_SYSROOT)" >>"$QTCONFIG.tmp"
|
echo " QMAKE_CFLAGS += --sysroot=\$\$[QT_SYSROOT]" >>"$QTCONFIG.tmp"
|
||||||
echo " QMAKE_CFLAGS += --sysroot=\$\$QT_SYSROOT" >>"$QTCONFIG.tmp"
|
echo " QMAKE_CXXFLAGS += --sysroot=\$\$[QT_SYSROOT]" >>"$QTCONFIG.tmp"
|
||||||
echo " QMAKE_CXXFLAGS += --sysroot=\$\$QT_SYSROOT" >>"$QTCONFIG.tmp"
|
echo " QMAKE_LFLAGS += --sysroot=\$\$[QT_SYSROOT]" >>"$QTCONFIG.tmp"
|
||||||
echo " QMAKE_LFLAGS += --sysroot=\$\$QT_SYSROOT" >>"$QTCONFIG.tmp"
|
|
||||||
echo "}" >> "$QTCONFIG.tmp"
|
echo "}" >> "$QTCONFIG.tmp"
|
||||||
echo >> "$QTCONFIG.tmp"
|
echo >> "$QTCONFIG.tmp"
|
||||||
fi
|
fi
|
||||||
|
6
dist/changes-5.0.0
vendored
6
dist/changes-5.0.0
vendored
@ -202,7 +202,11 @@ information about a particular change.
|
|||||||
|
|
||||||
- qmake
|
- qmake
|
||||||
* Projects which explicitly set an empty TARGET are considered broken now.
|
* Projects which explicitly set an empty TARGET are considered broken now.
|
||||||
* several functions and built-in variables were modified to return normalized paths.
|
* Configure's -sysroot and -hostprefix are now handled slightly differently.
|
||||||
|
The QT_INSTALL_... properties are now automatically prefixed with the sysroot;
|
||||||
|
the raw values are available as QT_RAW_INSTALL_... and the sysroot as QT_SYSROOT.
|
||||||
|
The new QT_HOST_... properties can be used to refer to the Qt host tools.
|
||||||
|
* Several functions and built-in variables were modified to return normalized paths.
|
||||||
|
|
||||||
- QTextCodecPlugin has been removed since it is no longer used. All text codecs
|
- QTextCodecPlugin has been removed since it is no longer used. All text codecs
|
||||||
are now built into QtCore.
|
are now built into QtCore.
|
||||||
|
@ -26,10 +26,10 @@ CONFIG = lex yacc warn_on debug uic resources $$CONFIG
|
|||||||
# can we tell syncqt to do a -developer-build
|
# can we tell syncqt to do a -developer-build
|
||||||
win32 {
|
win32 {
|
||||||
CMP_QDIR = $$upper($$QTDIR)
|
CMP_QDIR = $$upper($$QTDIR)
|
||||||
CMP_INSTALL_PREFIX = $$upper($$[QT_INSTALL_PREFIX])
|
CMP_INSTALL_PREFIX = $$upper($$[QT_HOST_PREFIX])
|
||||||
} else {
|
} else {
|
||||||
CMP_QDIR = $$QTDIR
|
CMP_QDIR = $$QTDIR
|
||||||
CMP_INSTALL_PREFIX = $$[QT_INSTALL_PREFIX]
|
CMP_INSTALL_PREFIX = $$[QT_HOST_PREFIX]
|
||||||
}
|
}
|
||||||
contains(CMP_QDIR, $$CMP_INSTALL_PREFIX):QTFWD = -qtdir $$QTDIR -module-fwd $$QTDIR/mkspecs/modules -developer-build
|
contains(CMP_QDIR, $$CMP_INSTALL_PREFIX):QTFWD = -qtdir $$QTDIR -module-fwd $$QTDIR/mkspecs/modules -developer-build
|
||||||
unset(CMP_QDIR)
|
unset(CMP_QDIR)
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
!isEmpty(MODULE_PRI) {
|
!isEmpty(MODULE_PRI) {
|
||||||
pritarget.path = $$[QT_INSTALL_DATA]/mkspecs/modules
|
pritarget.path = $$[QT_HOST_DATA]/mkspecs/modules
|
||||||
pritarget.files = $$MODULE_PRI
|
pritarget.files = $$MODULE_PRI
|
||||||
INSTALLS += pritarget
|
INSTALLS += pritarget
|
||||||
} else {
|
} else {
|
||||||
|
@ -8,7 +8,7 @@ exists($$_QMAKE_CACHE_) {
|
|||||||
isEmpty(QMAKE_QT_CONFIG)|!exists($$QMAKE_QT_CONFIG) {
|
isEmpty(QMAKE_QT_CONFIG)|!exists($$QMAKE_QT_CONFIG) {
|
||||||
!isEmpty(QT_BUILD_TREE):QMAKE_QT_CONFIG = $$QT_BUILD_TREE
|
!isEmpty(QT_BUILD_TREE):QMAKE_QT_CONFIG = $$QT_BUILD_TREE
|
||||||
else:exists($$_QMAKE_CACHE_):QMAKE_QT_CONFIG = $$fromfile($$_QMAKE_CACHE_, QT_BUILD_TREE)
|
else:exists($$_QMAKE_CACHE_):QMAKE_QT_CONFIG = $$fromfile($$_QMAKE_CACHE_, QT_BUILD_TREE)
|
||||||
isEmpty(QMAKE_QT_CONFIG):QMAKE_QT_CONFIG = $$[QT_INSTALL_DATA]
|
isEmpty(QMAKE_QT_CONFIG):QMAKE_QT_CONFIG = $$[QT_HOST_DATA]
|
||||||
QMAKE_QT_CONFIG = $$QMAKE_QT_CONFIG/mkspecs/qconfig.pri
|
QMAKE_QT_CONFIG = $$QMAKE_QT_CONFIG/mkspecs/qconfig.pri
|
||||||
}
|
}
|
||||||
!exists($$QMAKE_QT_CONFIG)|!include($$QMAKE_QT_CONFIG, "", true) {
|
!exists($$QMAKE_QT_CONFIG)|!include($$QMAKE_QT_CONFIG, "", true) {
|
||||||
|
@ -132,7 +132,7 @@ defineTest(qtAddModule) {
|
|||||||
|
|
||||||
isEmpty(LINKAGE) {
|
isEmpty(LINKAGE) {
|
||||||
# Make sure we can link to uninstalled libraries
|
# Make sure we can link to uninstalled libraries
|
||||||
!isEqual(MODULE_LIBS, $$[QT_INSTALL_LIBS]) {
|
!isEqual(MODULE_LIBS, $$[QT_INSTALL_LIBS]) { ### XXX
|
||||||
QMAKE_LIBDIR *= $$MODULE_LIBS
|
QMAKE_LIBDIR *= $$MODULE_LIBS
|
||||||
unix:!mac:QMAKE_LFLAGS *= "-Wl,-rpath-link,$$MODULE_LIBS"
|
unix:!mac:QMAKE_LFLAGS *= "-Wl,-rpath-link,$$MODULE_LIBS"
|
||||||
}
|
}
|
||||||
@ -164,7 +164,7 @@ defineTest(qtAddModule) {
|
|||||||
|
|
||||||
# variable, default
|
# variable, default
|
||||||
defineTest(qtPrepareTool) {
|
defineTest(qtPrepareTool) {
|
||||||
MODBASE = $$[QT_INSTALL_BINS]
|
MODBASE = $$[QT_HOST_BINS]
|
||||||
!isEmpty(QT_BUILD_TREE):MODBASE = $$QT_BUILD_TREE/bin
|
!isEmpty(QT_BUILD_TREE):MODBASE = $$QT_BUILD_TREE/bin
|
||||||
count(ARGS, 2, greaterThan) {
|
count(ARGS, 2, greaterThan) {
|
||||||
isEmpty(QT.$${3}.bins):warning("No QT.$${3}.bins, module path ignored for qtPrepareTool($$1, $$2, $$3)")
|
isEmpty(QT.$${3}.bins):warning("No QT.$${3}.bins, module path ignored for qtPrepareTool($$1, $$2, $$3)")
|
||||||
|
@ -8,7 +8,7 @@ isEmpty(QMAKE_QT_MODULE)|!exists($$QMAKE_QT_MODULE) {
|
|||||||
!exists($$QMAKE_QT_MODULE):exists($$QMAKE_CACHE_DIR/mkspecs/qmodule.pri):QMAKE_QT_MODULE = $$QMAKE_CACHE_DIR/mkspecs/qmodule.pri
|
!exists($$QMAKE_QT_MODULE):exists($$QMAKE_CACHE_DIR/mkspecs/qmodule.pri):QMAKE_QT_MODULE = $$QMAKE_CACHE_DIR/mkspecs/qmodule.pri
|
||||||
!exists($$QMAKE_QT_MODULE):exists($$QMAKE_CACHE_DIR/qtbase/mkspecs/qmodule.pri):QMAKE_QT_MODULE = $$QMAKE_CACHE_DIR/qtbase/mkspecs/qmodule.pri
|
!exists($$QMAKE_QT_MODULE):exists($$QMAKE_CACHE_DIR/qtbase/mkspecs/qmodule.pri):QMAKE_QT_MODULE = $$QMAKE_CACHE_DIR/qtbase/mkspecs/qmodule.pri
|
||||||
!exists($$QMAKE_QT_MODULE):if(!isEmpty(QT_BUILD_TREE) & exists($$QT_BUILD_TREE/mkspecs/qmodule.pri)):QMAKE_QT_MODULE = $$QT_BUILD_TREE/mkspecs/qmodule.pri
|
!exists($$QMAKE_QT_MODULE):if(!isEmpty(QT_BUILD_TREE) & exists($$QT_BUILD_TREE/mkspecs/qmodule.pri)):QMAKE_QT_MODULE = $$QT_BUILD_TREE/mkspecs/qmodule.pri
|
||||||
!exists($$QMAKE_QT_MODULE):exists($$[QT_INSTALL_DATA]/mkspecs/qmodule.pri):QMAKE_QT_MODULE = $$[QT_INSTALL_DATA]/mkspecs/qmodule.pri
|
!exists($$QMAKE_QT_MODULE):exists($$[QT_HOST_DATA]/mkspecs/qmodule.pri):QMAKE_QT_MODULE = $$[QT_HOST_DATA]/mkspecs/qmodule.pri
|
||||||
}
|
}
|
||||||
|
|
||||||
!contains(QMAKE_INTERNAL_INCLUDED_FILES, .*qmodule\\.pri) {
|
!contains(QMAKE_INTERNAL_INCLUDED_FILES, .*qmodule\\.pri) {
|
||||||
|
@ -118,18 +118,18 @@ load(qt_installs)
|
|||||||
|
|
||||||
unix {
|
unix {
|
||||||
CONFIG += create_libtool create_pc explicitlib
|
CONFIG += create_libtool create_pc explicitlib
|
||||||
QMAKE_LIBTOOL_LIBDIR = $$[QT_INSTALL_LIBS]
|
QMAKE_LIBTOOL_LIBDIR = $$[QT_RAW_INSTALL_LIBS]
|
||||||
QMAKE_PRL_LIBDIR = $$[QT_INSTALL_LIBS]
|
QMAKE_PRL_LIBDIR = $$[QT_RAW_INSTALL_LIBS] ### XXX
|
||||||
QMAKE_PKGCONFIG_LIBDIR = $$[QT_INSTALL_LIBS]
|
QMAKE_PKGCONFIG_LIBDIR = $$[QT_RAW_INSTALL_LIBS]
|
||||||
QMAKE_PKGCONFIG_INCDIR = $$[QT_INSTALL_HEADERS]/$$TARGET
|
QMAKE_PKGCONFIG_INCDIR = $$[QT_RAW_INSTALL_HEADERS]/$$TARGET
|
||||||
QMAKE_PKGCONFIG_CFLAGS = -I$$[QT_INSTALL_HEADERS]
|
QMAKE_PKGCONFIG_CFLAGS = -I$$[QT_RAW_INSTALL_HEADERS]
|
||||||
QMAKE_PKGCONFIG_DESTDIR = pkgconfig
|
QMAKE_PKGCONFIG_DESTDIR = pkgconfig
|
||||||
include_replace.match = $$QMAKE_INCDIR_QT
|
include_replace.match = $$QMAKE_INCDIR_QT
|
||||||
include_replace.replace = $$[QT_INSTALL_HEADERS]
|
include_replace.replace = $$[QT_RAW_INSTALL_HEADERS]
|
||||||
lib_replace.match = $$QMAKE_LIBDIR_QT
|
lib_replace.match = $$QMAKE_LIBDIR_QT
|
||||||
lib_replace.replace = $$[QT_INSTALL_LIBS]
|
lib_replace.replace = $$[QT_RAW_INSTALL_LIBS]
|
||||||
prefix_replace.match = $$QT_BUILD_TREE
|
prefix_replace.match = $$QT_BUILD_TREE
|
||||||
prefix_replace.replace = $$[QT_INSTALL_PREFIX]
|
prefix_replace.replace = $$[QT_RAW_INSTALL_PREFIX]
|
||||||
QMAKE_PRL_INSTALL_REPLACE += include_replace lib_replace
|
QMAKE_PRL_INSTALL_REPLACE += include_replace lib_replace
|
||||||
QMAKE_LIBTOOL_INSTALL_REPLACE += include_replace lib_replace
|
QMAKE_LIBTOOL_INSTALL_REPLACE += include_replace lib_replace
|
||||||
QMAKE_PKGCONFIG_INSTALL_REPLACE += include_replace lib_replace prefix_replace
|
QMAKE_PKGCONFIG_INSTALL_REPLACE += include_replace lib_replace prefix_replace
|
||||||
@ -137,9 +137,9 @@ unix {
|
|||||||
|
|
||||||
win32-g++* {
|
win32-g++* {
|
||||||
CONFIG += create_pc
|
CONFIG += create_pc
|
||||||
QMAKE_PKGCONFIG_LIBDIR = $$[QT_INSTALL_LIBS]
|
QMAKE_PKGCONFIG_LIBDIR = $$[QT_RAW_INSTALL_LIBS]
|
||||||
QMAKE_PKGCONFIG_INCDIR = $$[QT_INSTALL_HEADERS]/$$TARGET
|
QMAKE_PKGCONFIG_INCDIR = $$[QT_RAW_INSTALL_HEADERS]/$$TARGET
|
||||||
QMAKE_PKGCONFIG_CFLAGS = -I$$[QT_INSTALL_HEADERS]
|
QMAKE_PKGCONFIG_CFLAGS = -I$$[QT_RAW_INSTALL_HEADERS]
|
||||||
QMAKE_PKGCONFIG_DESTDIR = pkgconfig
|
QMAKE_PKGCONFIG_DESTDIR = pkgconfig
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3178,7 +3178,7 @@ MakefileGenerator::pkgConfigPrefix() const
|
|||||||
{
|
{
|
||||||
if(!project->isEmpty("QMAKE_PKGCONFIG_PREFIX"))
|
if(!project->isEmpty("QMAKE_PKGCONFIG_PREFIX"))
|
||||||
return project->first("QMAKE_PKGCONFIG_PREFIX");
|
return project->first("QMAKE_PKGCONFIG_PREFIX");
|
||||||
return QLibraryInfo::location(QLibraryInfo::PrefixPath);
|
return QLibraryInfo::rawLocation(QLibraryInfo::PrefixPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
QString
|
QString
|
||||||
|
@ -1575,11 +1575,11 @@ QString VcprojGenerator::findTemplate(QString file)
|
|||||||
QString ret;
|
QString ret;
|
||||||
if(!exists((ret = file)) &&
|
if(!exists((ret = file)) &&
|
||||||
!exists((ret = QString(Option::mkfile::qmakespec + "/" + file))) &&
|
!exists((ret = QString(Option::mkfile::qmakespec + "/" + file))) &&
|
||||||
!exists((ret = QString(QLibraryInfo::location(QLibraryInfo::DataPath) + "/win32-msvc.net/" + file))) &&
|
!exists((ret = QString(QLibraryInfo::location(QLibraryInfo::HostDataPath) + "/win32-msvc.net/" + file))) &&
|
||||||
!exists((ret = QString(QLibraryInfo::location(QLibraryInfo::DataPath) + "/win32-msvc2002/" + file))) &&
|
!exists((ret = QString(QLibraryInfo::location(QLibraryInfo::HostDataPath) + "/win32-msvc2002/" + file))) &&
|
||||||
!exists((ret = QString(QLibraryInfo::location(QLibraryInfo::DataPath) + "/win32-msvc2003/" + file))) &&
|
!exists((ret = QString(QLibraryInfo::location(QLibraryInfo::HostDataPath) + "/win32-msvc2003/" + file))) &&
|
||||||
!exists((ret = QString(QLibraryInfo::location(QLibraryInfo::DataPath) + "/win32-msvc2005/" + file))) &&
|
!exists((ret = QString(QLibraryInfo::location(QLibraryInfo::HostDataPath) + "/win32-msvc2005/" + file))) &&
|
||||||
!exists((ret = QString(QLibraryInfo::location(QLibraryInfo::DataPath) + "/win32-msvc2008/" + file))))
|
!exists((ret = QString(QLibraryInfo::location(QLibraryInfo::HostDataPath) + "/win32-msvc2008/" + file))))
|
||||||
return "";
|
return "";
|
||||||
debug_msg(1, "Generator: MSVC.NET: Found template \'%s\'", ret.toLatin1().constData());
|
debug_msg(1, "Generator: MSVC.NET: Found template \'%s\'", ret.toLatin1().constData());
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -592,7 +592,7 @@ QStringList qmake_feature_paths(QMakeProperty *prop=0)
|
|||||||
}
|
}
|
||||||
for(QStringList::Iterator concat_it = concat.begin();
|
for(QStringList::Iterator concat_it = concat.begin();
|
||||||
concat_it != concat.end(); ++concat_it)
|
concat_it != concat.end(); ++concat_it)
|
||||||
feature_roots << (QLibraryInfo::location(QLibraryInfo::DataPath) +
|
feature_roots << (QLibraryInfo::location(QLibraryInfo::HostDataPath) +
|
||||||
mkspecs_concat + (*concat_it));
|
mkspecs_concat + (*concat_it));
|
||||||
return feature_roots;
|
return feature_roots;
|
||||||
}
|
}
|
||||||
@ -607,7 +607,7 @@ QStringList qmake_mkspec_paths()
|
|||||||
for(QStringList::ConstIterator it = lst.begin(); it != lst.end(); ++it)
|
for(QStringList::ConstIterator it = lst.begin(); it != lst.end(); ++it)
|
||||||
ret << ((*it) + concat);
|
ret << ((*it) + concat);
|
||||||
}
|
}
|
||||||
ret << QLibraryInfo::location(QLibraryInfo::DataPath) + concat;
|
ret << QLibraryInfo::location(QLibraryInfo::HostDataPath) + concat;
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -3113,7 +3113,7 @@ QStringList &QMakeProject::values(const QString &_var, QHash<QString, QStringLis
|
|||||||
place[var] = QStringList(Option::fixPathToTargetOS(
|
place[var] = QStringList(Option::fixPathToTargetOS(
|
||||||
!Option::qmake_abslocation.isEmpty()
|
!Option::qmake_abslocation.isEmpty()
|
||||||
? Option::qmake_abslocation
|
? Option::qmake_abslocation
|
||||||
: QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/qmake",
|
: QLibraryInfo::location(QLibraryInfo::HostBinariesPath) + "/qmake",
|
||||||
false));
|
false));
|
||||||
}
|
}
|
||||||
#if defined(Q_OS_WIN32) && defined(Q_CC_MSVC)
|
#if defined(Q_OS_WIN32) && defined(Q_CC_MSVC)
|
||||||
|
@ -54,27 +54,45 @@ QStringList qmake_mkspec_paths(); //project.cpp
|
|||||||
static const struct {
|
static const struct {
|
||||||
const char *name;
|
const char *name;
|
||||||
QLibraryInfo::LibraryLocation loc;
|
QLibraryInfo::LibraryLocation loc;
|
||||||
|
bool raw;
|
||||||
} propList[] = {
|
} propList[] = {
|
||||||
{ "QT_INSTALL_PREFIX", QLibraryInfo::PrefixPath },
|
{ "QT_SYSROOT", QLibraryInfo::SysrootPath, true },
|
||||||
{ "QT_INSTALL_DATA", QLibraryInfo::DataPath },
|
{ "QT_INSTALL_PREFIX", QLibraryInfo::PrefixPath, false },
|
||||||
{ "QT_INSTALL_DOCS", QLibraryInfo::DocumentationPath },
|
{ "QT_INSTALL_DATA", QLibraryInfo::DataPath, false },
|
||||||
{ "QT_INSTALL_HEADERS", QLibraryInfo::HeadersPath },
|
{ "QT_INSTALL_DOCS", QLibraryInfo::DocumentationPath, false },
|
||||||
{ "QT_INSTALL_LIBS", QLibraryInfo::LibrariesPath },
|
{ "QT_INSTALL_HEADERS", QLibraryInfo::HeadersPath, false },
|
||||||
{ "QT_INSTALL_BINS", QLibraryInfo::BinariesPath },
|
{ "QT_INSTALL_LIBS", QLibraryInfo::LibrariesPath, false },
|
||||||
{ "QT_INSTALL_TESTS", QLibraryInfo::TestsPath },
|
{ "QT_INSTALL_BINS", QLibraryInfo::BinariesPath, false },
|
||||||
{ "QT_INSTALL_PLUGINS", QLibraryInfo::PluginsPath },
|
{ "QT_INSTALL_TESTS", QLibraryInfo::TestsPath, false },
|
||||||
{ "QT_INSTALL_IMPORTS", QLibraryInfo::ImportsPath },
|
{ "QT_INSTALL_PLUGINS", QLibraryInfo::PluginsPath, false },
|
||||||
{ "QT_INSTALL_TRANSLATIONS", QLibraryInfo::TranslationsPath },
|
{ "QT_INSTALL_IMPORTS", QLibraryInfo::ImportsPath, false },
|
||||||
{ "QT_INSTALL_CONFIGURATION", QLibraryInfo::SettingsPath },
|
{ "QT_INSTALL_TRANSLATIONS", QLibraryInfo::TranslationsPath, false },
|
||||||
{ "QT_INSTALL_EXAMPLES", QLibraryInfo::ExamplesPath },
|
{ "QT_INSTALL_CONFIGURATION", QLibraryInfo::SettingsPath, false },
|
||||||
{ "QT_INSTALL_DEMOS", QLibraryInfo::ExamplesPath }, // Just backwards compat
|
{ "QT_INSTALL_EXAMPLES", QLibraryInfo::ExamplesPath, false },
|
||||||
|
{ "QT_INSTALL_DEMOS", QLibraryInfo::ExamplesPath, false }, // Just backwards compat
|
||||||
|
{ "QT_RAW_INSTALL_PREFIX", QLibraryInfo::PrefixPath, true },
|
||||||
|
{ "QT_RAW_INSTALL_DATA", QLibraryInfo::DataPath, true },
|
||||||
|
{ "QT_RAW_INSTALL_DOCS", QLibraryInfo::DocumentationPath, true },
|
||||||
|
{ "QT_RAW_INSTALL_HEADERS", QLibraryInfo::HeadersPath, true },
|
||||||
|
{ "QT_RAW_INSTALL_LIBS", QLibraryInfo::LibrariesPath, true },
|
||||||
|
{ "QT_RAW_INSTALL_BINS", QLibraryInfo::BinariesPath, true },
|
||||||
|
{ "QT_RAW_INSTALL_TESTS", QLibraryInfo::TestsPath, true },
|
||||||
|
{ "QT_RAW_INSTALL_PLUGINS", QLibraryInfo::PluginsPath, true },
|
||||||
|
{ "QT_RAW_INSTALL_IMPORTS", QLibraryInfo::ImportsPath, true },
|
||||||
|
{ "QT_RAW_INSTALL_TRANSLATIONS", QLibraryInfo::TranslationsPath, true },
|
||||||
|
{ "QT_RAW_INSTALL_CONFIGURATION", QLibraryInfo::SettingsPath, true },
|
||||||
|
{ "QT_RAW_INSTALL_EXAMPLES", QLibraryInfo::ExamplesPath, true },
|
||||||
|
{ "QT_HOST_PREFIX", QLibraryInfo::HostPrefixPath, true },
|
||||||
|
{ "QT_HOST_DATA", QLibraryInfo::HostDataPath, true },
|
||||||
|
{ "QT_HOST_BINS", QLibraryInfo::HostBinariesPath, true },
|
||||||
};
|
};
|
||||||
|
|
||||||
QMakeProperty::QMakeProperty() : settings(0)
|
QMakeProperty::QMakeProperty() : settings(0)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < sizeof(propList)/sizeof(propList[0]); i++)
|
for (int i = 0; i < sizeof(propList)/sizeof(propList[0]); i++)
|
||||||
m_values[QString::fromLatin1(propList[i].name)] =
|
m_values[QString::fromLatin1(propList[i].name)] = propList[i].raw
|
||||||
QLibraryInfo::location(propList[i].loc);
|
? QLibraryInfo::rawLocation(propList[i].loc)
|
||||||
|
: QLibraryInfo::location(propList[i].loc);
|
||||||
}
|
}
|
||||||
|
|
||||||
QMakeProperty::~QMakeProperty()
|
QMakeProperty::~QMakeProperty()
|
||||||
|
@ -98,7 +98,7 @@ CONFIG -= qt
|
|||||||
### installations ####
|
### installations ####
|
||||||
|
|
||||||
#qmake
|
#qmake
|
||||||
qmake.path=$$[QT_INSTALL_BINS]
|
qmake.path = $$[QT_HOST_BINS]
|
||||||
win32 {
|
win32 {
|
||||||
qmake.files=$$QT_BUILD_TREE/bin/qmake.exe
|
qmake.files=$$QT_BUILD_TREE/bin/qmake.exe
|
||||||
} else {
|
} else {
|
||||||
@ -107,18 +107,18 @@ win32 {
|
|||||||
INSTALLS += qmake
|
INSTALLS += qmake
|
||||||
|
|
||||||
#syncqt
|
#syncqt
|
||||||
syncqt.path=$$[QT_INSTALL_BINS]
|
syncqt.path = $$[QT_HOST_BINS]
|
||||||
syncqt.files=$$QT_BUILD_TREE/bin/syncqt
|
syncqt.files=$$QT_BUILD_TREE/bin/syncqt
|
||||||
win32:syncqt.files=$$QT_BUILD_TREE/bin/syncqt.bat
|
win32:syncqt.files=$$QT_BUILD_TREE/bin/syncqt.bat
|
||||||
INSTALLS += syncqt
|
INSTALLS += syncqt
|
||||||
|
|
||||||
#qtmodule-configtests
|
#qtmodule-configtests
|
||||||
configtests.path=$$[QT_INSTALL_BINS]
|
configtests.path = $$[QT_HOST_BINS]
|
||||||
configtests.files=$$QT_BUILD_TREE/bin/qtmodule-configtests
|
configtests.files=$$QT_BUILD_TREE/bin/qtmodule-configtests
|
||||||
INSTALLS += configtests
|
INSTALLS += configtests
|
||||||
|
|
||||||
#mkspecs
|
#mkspecs
|
||||||
mkspecs.path=$$[QT_INSTALL_DATA]/mkspecs
|
mkspecs.path = $$[QT_HOST_DATA]/mkspecs
|
||||||
mkspecs.files=$$QT_BUILD_TREE/mkspecs/qconfig.pri $$QT_BUILD_TREE/mkspecs/qmodule.pri $$files($$QT_SOURCE_TREE/mkspecs/*)
|
mkspecs.files=$$QT_BUILD_TREE/mkspecs/qconfig.pri $$QT_BUILD_TREE/mkspecs/qmodule.pri $$files($$QT_SOURCE_TREE/mkspecs/*)
|
||||||
mkspecs.files -= $$QT_SOURCE_TREE/mkspecs/modules
|
mkspecs.files -= $$QT_SOURCE_TREE/mkspecs/modules
|
||||||
unix {
|
unix {
|
||||||
|
@ -228,16 +228,43 @@ static const struct {
|
|||||||
{ "Translations", "translations" },
|
{ "Translations", "translations" },
|
||||||
{ "Examples", "" },
|
{ "Examples", "" },
|
||||||
{ "Tests", "tests" },
|
{ "Tests", "tests" },
|
||||||
|
#ifdef QT_BUILD_QMAKE
|
||||||
|
{ "Sysroot", "" },
|
||||||
|
{ "HostPrefix", "" },
|
||||||
|
{ "HostBinaries", "bin" },
|
||||||
|
{ "HostData", "" },
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
Returns the location specified by \a loc.
|
Returns the location specified by \a loc.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
QString
|
QString
|
||||||
QLibraryInfo::location(LibraryLocation loc)
|
QLibraryInfo::location(LibraryLocation loc)
|
||||||
{
|
{
|
||||||
|
#ifdef QT_BUILD_QMAKE
|
||||||
|
QString ret = rawLocation(loc);
|
||||||
|
|
||||||
|
// Automatically prepend the sysroot to target paths
|
||||||
|
if (loc < SysrootPath || loc > LastHostPath) {
|
||||||
|
QString sysroot = rawLocation(SysrootPath);
|
||||||
|
if (!sysroot.isEmpty() && ret.length() > 2 && ret.at(1) == QLatin1Char(':')
|
||||||
|
&& (ret.at(2) == QLatin1Char('/') || ret.at(2) == QLatin1Char('\\')))
|
||||||
|
ret.replace(0, 2, sysroot); // Strip out the drive on Windows targets
|
||||||
|
else
|
||||||
|
ret.prepend(sysroot);
|
||||||
|
}
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
QString
|
||||||
|
QLibraryInfo::rawLocation(LibraryLocation loc)
|
||||||
|
{
|
||||||
|
#else
|
||||||
|
# define rawLocation location
|
||||||
|
#endif
|
||||||
QString ret;
|
QString ret;
|
||||||
if(!QLibraryInfoPrivate::configuration()) {
|
if(!QLibraryInfoPrivate::configuration()) {
|
||||||
const char *path = 0;
|
const char *path = 0;
|
||||||
@ -284,11 +311,19 @@ QLibraryInfo::location(LibraryLocation loc)
|
|||||||
|
|
||||||
if (QDir::isRelativePath(ret)) {
|
if (QDir::isRelativePath(ret)) {
|
||||||
QString baseDir;
|
QString baseDir;
|
||||||
if (loc == PrefixPath) {
|
|
||||||
// we make the prefix path absolute to the executable's directory
|
|
||||||
#ifdef QT_BUILD_QMAKE
|
#ifdef QT_BUILD_QMAKE
|
||||||
|
if (loc == HostPrefixPath || loc == PrefixPath) {
|
||||||
|
// We make the prefix path absolute to the executable's directory.
|
||||||
|
// loc == PrefixPath while a sysroot is set would make no sense here.
|
||||||
baseDir = QFileInfo(qmake_libraryInfoFile()).absolutePath();
|
baseDir = QFileInfo(qmake_libraryInfoFile()).absolutePath();
|
||||||
|
} else if (loc == SysrootPath) {
|
||||||
|
// The sysroot is bare
|
||||||
|
return ret;
|
||||||
|
} else if (loc > SysrootPath && loc <= LastHostPath) {
|
||||||
|
// We make any other host path absolute to the host prefix directory.
|
||||||
|
baseDir = rawLocation(HostPrefixPath);
|
||||||
#else
|
#else
|
||||||
|
if (loc == PrefixPath) {
|
||||||
if (QCoreApplication::instance()) {
|
if (QCoreApplication::instance()) {
|
||||||
#ifdef Q_OS_MAC
|
#ifdef Q_OS_MAC
|
||||||
CFBundleRef bundleRef = CFBundleGetMainBundle();
|
CFBundleRef bundleRef = CFBundleGetMainBundle();
|
||||||
@ -300,6 +335,7 @@ QLibraryInfo::location(LibraryLocation loc)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
// We make the prefix path absolute to the executable's directory.
|
||||||
baseDir = QCoreApplication::applicationDirPath();
|
baseDir = QCoreApplication::applicationDirPath();
|
||||||
} else {
|
} else {
|
||||||
baseDir = QDir::currentPath();
|
baseDir = QDir::currentPath();
|
||||||
@ -307,7 +343,7 @@ QLibraryInfo::location(LibraryLocation loc)
|
|||||||
#endif
|
#endif
|
||||||
} else {
|
} else {
|
||||||
// we make any other path absolute to the prefix directory
|
// we make any other path absolute to the prefix directory
|
||||||
baseDir = location(PrefixPath);
|
baseDir = rawLocation(PrefixPath);
|
||||||
}
|
}
|
||||||
ret = QDir::cleanPath(baseDir + QLatin1Char('/') + ret);
|
ret = QDir::cleanPath(baseDir + QLatin1Char('/') + ret);
|
||||||
}
|
}
|
||||||
|
@ -77,9 +77,21 @@ public:
|
|||||||
TranslationsPath,
|
TranslationsPath,
|
||||||
ExamplesPath,
|
ExamplesPath,
|
||||||
TestsPath,
|
TestsPath,
|
||||||
|
// Insert new values above this line
|
||||||
|
#ifdef QT_BUILD_QMAKE
|
||||||
|
// These are not subject to binary compatibility constraints
|
||||||
|
SysrootPath,
|
||||||
|
HostPrefixPath,
|
||||||
|
HostBinariesPath,
|
||||||
|
HostDataPath,
|
||||||
|
LastHostPath = HostDataPath,
|
||||||
|
#endif
|
||||||
SettingsPath = 100
|
SettingsPath = 100
|
||||||
};
|
};
|
||||||
static QString location(LibraryLocation); // ### Qt 5: consider renaming it to path()
|
static QString location(LibraryLocation); // ### Qt 5: consider renaming it to path()
|
||||||
|
#ifdef QT_BUILD_QMAKE
|
||||||
|
static QString rawLocation(LibraryLocation);
|
||||||
|
#endif
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QLibraryInfo();
|
QLibraryInfo();
|
||||||
|
@ -13,6 +13,6 @@ HEADERS += qdatetime_p.h
|
|||||||
SOURCES += main.cpp
|
SOURCES += main.cpp
|
||||||
include(../bootstrap/bootstrap.pri)
|
include(../bootstrap/bootstrap.pri)
|
||||||
|
|
||||||
target.path=$$[QT_INSTALL_BINS]
|
target.path = $$[QT_HOST_BINS]
|
||||||
INSTALLS += target
|
INSTALLS += target
|
||||||
load(qt_targets)
|
load(qt_targets)
|
||||||
|
@ -11,6 +11,6 @@ HEADERS += ../../corelib/kernel/qcorecmdlineargs_p.h
|
|||||||
SOURCES += main.cpp
|
SOURCES += main.cpp
|
||||||
include(../bootstrap/bootstrap.pri)
|
include(../bootstrap/bootstrap.pri)
|
||||||
|
|
||||||
target.path=$$[QT_INSTALL_BINS]
|
target.path = $$[QT_HOST_BINS]
|
||||||
INSTALLS += target
|
INSTALLS += target
|
||||||
load(qt_targets)
|
load(qt_targets)
|
||||||
|
@ -22,6 +22,6 @@ linux-g++-maemo {
|
|||||||
|
|
||||||
include(../bootstrap/bootstrap.pri)
|
include(../bootstrap/bootstrap.pri)
|
||||||
|
|
||||||
target.path=$$[QT_INSTALL_BINS]
|
target.path = $$[QT_HOST_BINS]
|
||||||
INSTALLS += target
|
INSTALLS += target
|
||||||
load(qt_targets)
|
load(qt_targets)
|
||||||
|
@ -1063,11 +1063,33 @@ void Configure::parseCmdLine()
|
|||||||
dictionary[ "QT_INSTALL_TESTS" ] = configCmdLine.at(i);
|
dictionary[ "QT_INSTALL_TESTS" ] = configCmdLine.at(i);
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (configCmdLine.at(i) == "-hostprefix") {
|
else if (configCmdLine.at(i) == "-sysroot") {
|
||||||
++i;
|
++i;
|
||||||
if (i == argCount)
|
if (i == argCount)
|
||||||
break;
|
break;
|
||||||
dictionary[ "QT_HOST_PREFIX" ] = configCmdLine.at(i);
|
dictionary[ "CFG_SYSROOT" ] = configCmdLine.at(i);
|
||||||
|
}
|
||||||
|
|
||||||
|
else if (configCmdLine.at(i) == "-hostprefix") {
|
||||||
|
++i;
|
||||||
|
if (i == argCount || configCmdLine.at(i).startsWith('-'))
|
||||||
|
dictionary[ "QT_HOST_PREFIX" ] = dictionary[ "QT_BUILD_TREE" ];
|
||||||
|
else
|
||||||
|
dictionary[ "QT_HOST_PREFIX" ] = configCmdLine.at(i);
|
||||||
|
}
|
||||||
|
|
||||||
|
else if (configCmdLine.at(i) == "-hostbindir") {
|
||||||
|
++i;
|
||||||
|
if (i == argCount)
|
||||||
|
break;
|
||||||
|
dictionary[ "QT_HOST_BINS" ] = configCmdLine.at(i);
|
||||||
|
}
|
||||||
|
|
||||||
|
else if (configCmdLine.at(i) == "-hostdatadir") {
|
||||||
|
++i;
|
||||||
|
if (i == argCount)
|
||||||
|
break;
|
||||||
|
dictionary[ "QT_HOST_DATA" ] = configCmdLine.at(i);
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (configCmdLine.at(i) == "-make") {
|
else if (configCmdLine.at(i) == "-make") {
|
||||||
@ -2381,6 +2403,16 @@ void Configure::generateOutputVars()
|
|||||||
if (!dictionary[ "QT_INSTALL_TESTS" ].size())
|
if (!dictionary[ "QT_INSTALL_TESTS" ].size())
|
||||||
dictionary[ "QT_INSTALL_TESTS" ] = qipempty ? "" : fixSeparators(dictionary[ "QT_INSTALL_PREFIX" ] + "/tests");
|
dictionary[ "QT_INSTALL_TESTS" ] = qipempty ? "" : fixSeparators(dictionary[ "QT_INSTALL_PREFIX" ] + "/tests");
|
||||||
|
|
||||||
|
bool haveHpx = false;
|
||||||
|
if (dictionary[ "QT_HOST_PREFIX" ].isEmpty())
|
||||||
|
dictionary[ "QT_HOST_PREFIX" ] = dictionary[ "QT_INSTALL_PREFIX" ];
|
||||||
|
else
|
||||||
|
haveHpx = true;
|
||||||
|
if (dictionary[ "QT_HOST_BINS" ].isEmpty())
|
||||||
|
dictionary[ "QT_HOST_BINS" ] = haveHpx ? fixSeparators(dictionary[ "QT_HOST_PREFIX" ] + "/bin") : dictionary[ "QT_INSTALL_BINS" ];
|
||||||
|
if (dictionary[ "QT_HOST_DATA" ].isEmpty())
|
||||||
|
dictionary[ "QT_HOST_DATA" ] = haveHpx ? dictionary[ "QT_HOST_PREFIX" ] : dictionary[ "QT_INSTALL_DATA" ];
|
||||||
|
|
||||||
if (dictionary.contains("XQMAKESPEC") && dictionary[ "XQMAKESPEC" ].startsWith("linux"))
|
if (dictionary.contains("XQMAKESPEC") && dictionary[ "XQMAKESPEC" ].startsWith("linux"))
|
||||||
dictionary[ "QMAKE_RPATHDIR" ] = dictionary[ "QT_INSTALL_LIBS" ];
|
dictionary[ "QMAKE_RPATHDIR" ] = dictionary[ "QT_INSTALL_LIBS" ];
|
||||||
|
|
||||||
@ -2599,6 +2631,17 @@ void Configure::generateCachefile()
|
|||||||
<< "QT_MINOR_VERSION = " << dictionary["VERSION_MINOR"] << endl
|
<< "QT_MINOR_VERSION = " << dictionary["VERSION_MINOR"] << endl
|
||||||
<< "QT_PATCH_VERSION = " << dictionary["VERSION_PATCH"] << endl;
|
<< "QT_PATCH_VERSION = " << dictionary["VERSION_PATCH"] << endl;
|
||||||
|
|
||||||
|
if (!dictionary["CFG_SYSROOT"].isEmpty()) {
|
||||||
|
QString targetSpec = dictionary.contains("XQMAKESPEC") ? dictionary[ "XQMAKESPEC" ] : dictionary[ "QMAKESPEC" ];
|
||||||
|
configStream << endl
|
||||||
|
<< "# sysroot" << endl
|
||||||
|
<< targetSpec << " {" << endl
|
||||||
|
<< " QMAKE_CFLAGS += --sysroot=$$[QT_SYSROOT]" << endl
|
||||||
|
<< " QMAKE_CXXFLAGS += --sysroot=$$[QT_SYSROOT]" << endl
|
||||||
|
<< " QMAKE_LFLAGS += --sysroot=$$[QT_SYSROOT]" << endl
|
||||||
|
<< "}" << endl;
|
||||||
|
}
|
||||||
|
|
||||||
configStream.flush();
|
configStream.flush();
|
||||||
configFile.close();
|
configFile.close();
|
||||||
}
|
}
|
||||||
@ -2854,10 +2897,8 @@ void Configure::generateConfigfiles()
|
|||||||
<< endl
|
<< endl
|
||||||
<< "/* Build date */" << endl
|
<< "/* Build date */" << endl
|
||||||
<< "static const char qt_configure_installation [11 + 12] = \"qt_instdate=" << QDate::currentDate().toString(Qt::ISODate) << "\";" << endl
|
<< "static const char qt_configure_installation [11 + 12] = \"qt_instdate=" << QDate::currentDate().toString(Qt::ISODate) << "\";" << endl
|
||||||
<< endl;
|
<< endl
|
||||||
if (!dictionary[ "QT_HOST_PREFIX" ].isNull())
|
<< "static const char qt_configure_prefix_path_strs[][12 + 512] = {" << endl
|
||||||
tmpStream << "#if !defined(QT_BOOTSTRAPPED) && !defined(QT_BUILD_QMAKE)" << endl;
|
|
||||||
tmpStream << "static const char qt_configure_prefix_path_strs[][12 + 512] = {" << endl
|
|
||||||
<< " \"qt_prfxpath=" << escapeSeparators(dictionary["QT_INSTALL_PREFIX"]) << "\"," << endl
|
<< " \"qt_prfxpath=" << escapeSeparators(dictionary["QT_INSTALL_PREFIX"]) << "\"," << endl
|
||||||
<< " \"qt_docspath=" << escapeSeparators(dictionary["QT_INSTALL_DOCS"]) << "\"," << endl
|
<< " \"qt_docspath=" << escapeSeparators(dictionary["QT_INSTALL_DOCS"]) << "\"," << endl
|
||||||
<< " \"qt_hdrspath=" << escapeSeparators(dictionary["QT_INSTALL_HEADERS"]) << "\"," << endl
|
<< " \"qt_hdrspath=" << escapeSeparators(dictionary["QT_INSTALL_HEADERS"]) << "\"," << endl
|
||||||
@ -2869,27 +2910,16 @@ void Configure::generateConfigfiles()
|
|||||||
<< " \"qt_trnspath=" << escapeSeparators(dictionary["QT_INSTALL_TRANSLATIONS"]) << "\"," << endl
|
<< " \"qt_trnspath=" << escapeSeparators(dictionary["QT_INSTALL_TRANSLATIONS"]) << "\"," << endl
|
||||||
<< " \"qt_xmplpath=" << escapeSeparators(dictionary["QT_INSTALL_EXAMPLES"]) << "\"," << endl
|
<< " \"qt_xmplpath=" << escapeSeparators(dictionary["QT_INSTALL_EXAMPLES"]) << "\"," << endl
|
||||||
<< " \"qt_tstspath=" << escapeSeparators(dictionary["QT_INSTALL_TESTS"]) << "\"," << endl
|
<< " \"qt_tstspath=" << escapeSeparators(dictionary["QT_INSTALL_TESTS"]) << "\"," << endl
|
||||||
|
<< "#ifdef QT_BUILD_QMAKE" << endl
|
||||||
|
<< " \"qt_ssrtpath=" << escapeSeparators(dictionary["CFG_SYSROOT"]) << "\"," << endl
|
||||||
|
<< " \"qt_hpfxpath=" << escapeSeparators(dictionary["QT_HOST_PREFIX"]) << "\"," << endl
|
||||||
|
<< " \"qt_hbinpath=" << escapeSeparators(dictionary["QT_HOST_BINS"]) << "\"," << endl
|
||||||
|
<< " \"qt_hdatpath=" << escapeSeparators(dictionary["QT_HOST_DATA"]) << "\"," << endl
|
||||||
|
<< "#endif" << endl
|
||||||
<< "};" << endl
|
<< "};" << endl
|
||||||
//<< "static const char qt_configure_settings_path_str [256] = \"qt_stngpath=" << escapeSeparators(dictionary["QT_INSTALL_SETTINGS"]) << "\";" << endl
|
//<< "static const char qt_configure_settings_path_str [256] = \"qt_stngpath=" << escapeSeparators(dictionary["QT_INSTALL_SETTINGS"]) << "\";" << endl
|
||||||
;
|
<< endl
|
||||||
if (!dictionary[ "QT_HOST_PREFIX" ].isNull()) {
|
<< "/* strlen( \"qt_lcnsxxxx\") == 12 */" << endl
|
||||||
tmpStream << "#else" << endl
|
|
||||||
<< "static const char qt_configure_prefix_path_strs[][12 + 512] = {" << endl
|
|
||||||
<< " \"qt_prfxpath=" << escapeSeparators(dictionary[ "QT_HOST_PREFIX" ]) << "\";" << endl
|
|
||||||
<< " \"qt_docspath=" << fixSeparators(dictionary[ "QT_HOST_PREFIX" ] + "/doc", true) <<"\"," << endl
|
|
||||||
<< " \"qt_hdrspath=" << fixSeparators(dictionary[ "QT_HOST_PREFIX" ] + "/include", true) <<"\"," << endl
|
|
||||||
<< " \"qt_libspath=" << fixSeparators(dictionary[ "QT_HOST_PREFIX" ] + "/lib", true) <<"\"," << endl
|
|
||||||
<< " \"qt_binspath=" << fixSeparators(dictionary[ "QT_HOST_PREFIX" ] + "/bin", true) <<"\"," << endl
|
|
||||||
<< " \"qt_plugpath=" << fixSeparators(dictionary[ "QT_HOST_PREFIX" ] + "/plugins", true) <<"\"," << endl
|
|
||||||
<< " \"qt_impspath=" << fixSeparators(dictionary[ "QT_HOST_PREFIX" ] + "/imports", true) <<"\"," << endl
|
|
||||||
<< " \"qt_datapath=" << fixSeparators(dictionary[ "QT_HOST_PREFIX" ], true) <<"\"," << endl
|
|
||||||
<< " \"qt_trnspath=" << fixSeparators(dictionary[ "QT_HOST_PREFIX" ] + "/translations", true) <<"\"," << endl
|
|
||||||
<< " \"qt_xmplpath=" << fixSeparators(dictionary[ "QT_HOST_PREFIX" ] + "/example", true) <<"\"," << endl
|
|
||||||
<< " \"qt_tstspath=" << fixSeparators(dictionary[ "QT_HOST_PREFIX" ] + "/tests", true) <<"\"," << endl
|
|
||||||
<< "};" << endl
|
|
||||||
<< "#endif //QT_BOOTSTRAPPED" << endl;
|
|
||||||
}
|
|
||||||
tmpStream << "/* strlen( \"qt_lcnsxxxx\") == 12 */" << endl
|
|
||||||
<< "#define QT_CONFIGURE_LICENSEE qt_configure_licensee_str + 12;" << endl
|
<< "#define QT_CONFIGURE_LICENSEE qt_configure_licensee_str + 12;" << endl
|
||||||
<< "#define QT_CONFIGURE_LICENSED_PRODUCTS qt_configure_licensed_products_str + 12;" << endl
|
<< "#define QT_CONFIGURE_LICENSED_PRODUCTS qt_configure_licensed_products_str + 12;" << endl
|
||||||
//<< "#define QT_CONFIGURE_SETTINGS_PATH qt_configure_settings_path_str + 12;" << endl
|
//<< "#define QT_CONFIGURE_SETTINGS_PATH qt_configure_settings_path_str + 12;" << endl
|
||||||
|
Loading…
Reference in New Issue
Block a user