Skip to content

Commit

Permalink
syncqt: fix forwarding injected headers, take ~3
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
ossilator authored and liangqi committed Sep 12, 2018
1 parent 9da5b6f commit 2aa779e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion bin/syncqt.pl
Original file line number Diff line number Diff line change
Expand Up @@ -1111,7 +1111,7 @@ ($$)
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);
}
Expand Down
3 changes: 2 additions & 1 deletion mkspecs/features/qt_build_paths.prf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions mkspecs/features/qt_module_headers.prf
Original file line number Diff line number Diff line change
Expand Up @@ -123,15 +123,15 @@ 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
}

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
Expand Down

0 comments on commit 2aa779e

Please sign in to comment.