syncqt: fix forwarding injected headers, take ~3

in non-prefix builds, the forwarding headers always end up in qtbase's
build dir, while the injected headers always live in the build dir of
the module they belong to. to deal with that, we now record the target
path relative to the module root dir instead of relative to the base
directory of the forwarding header itself.

Fixes: QTBUG-70056
Change-Id: Ic4346148a125b13e2610f6965cdf4f5266ac763e
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
This commit is contained in:
Oswald Buddenhagen 2018-09-10 17:33:09 +02:00 committed by Liang Qi
parent 9da5b6f743
commit 2aa779e893
3 changed files with 5 additions and 4 deletions

View File

@ -1111,7 +1111,7 @@ foreach my $lib (@modules_to_sync) {
elsif (!$shadow) {
$pri_install_pfiles.= "$pri_install_iheader ";;
}
$pri_injections .= fixPaths($iheader, "$out_basedir/include/$lib")
$pri_injections .= fixPaths($iheader, $out_basedir)
.":".($no_stamp ? "^" : "").fixPaths($oheader, "$out_basedir/include/$lib")
.$injection." " if ($shadow);
}

View File

@ -12,7 +12,8 @@
# Find the module's source root dir.
isEmpty(_QMAKE_CONF_): error("Project has no top-level .qmake.conf file.")
MODULE_BASE_INDIR = $$dirname(_QMAKE_CONF_)
MODULE_BASE_OUTDIR = $$shadowed($$MODULE_BASE_INDIR)
REAL_MODULE_BASE_OUTDIR = $$shadowed($$MODULE_BASE_INDIR)
MODULE_BASE_OUTDIR = $$REAL_MODULE_BASE_OUTDIR
!isEmpty(MODULE_BASE_DIR): MODULE_SYNCQT_DIR = $$MODULE_BASE_DIR # compat for webkit
isEmpty(MODULE_SYNCQT_DIR): MODULE_SYNCQT_DIR = $$MODULE_BASE_INDIR
isEmpty(MODULE_QMAKE_OUTDIR): MODULE_QMAKE_OUTDIR = $$MODULE_BASE_OUTDIR

View File

@ -123,7 +123,7 @@ MODULE_INC_OUTDIR = $$MODULE_BASE_OUTDIR/include/$$MODULE_INCNAME
isEmpty(MODULE_CFG_FILE): MODULE_CFG_FILE = qt$${MODULE}-config
exists($$OUT_PWD/$${MODULE_CFG_FILE}.h) {
fwd_rel = $$relative_path($$OUT_PWD, $$MODULE_INC_OUTDIR)
fwd_rel = $$relative_path($$OUT_PWD, $$REAL_MODULE_BASE_OUTDIR)
SYNCQT.INJECTIONS += \
$$fwd_rel/$${MODULE_CFG_FILE}.h:$${MODULE_CFG_FILE}.h \
$$fwd_rel/$${MODULE_CFG_FILE}_p.h:$$MODULE_VERSION/$$MODULE_INCNAME/private/$${MODULE_CFG_FILE}_p.h
@ -131,7 +131,7 @@ exists($$OUT_PWD/$${MODULE_CFG_FILE}.h) {
for (injection, SYNCQT.INJECTIONS) {
injects = $$split(injection, :)
dst_hdr = $$absolute_path($$member(injects, 0), $$MODULE_INC_OUTDIR)
dst_hdr = $$absolute_path($$member(injects, 0), $$REAL_MODULE_BASE_OUTDIR)
ofwd_hdr = $$member(injects, 1)
fwd_hdr = $$replace(ofwd_hdr, ^\\^, )
MAIN_FWD = $$MODULE_INC_OUTDIR/$$fwd_hdr