fix location of injected headers in shadow builds

they are build-time generated, so they must go to the build dir
irrespective of whether we're using pre-synced headers.

Task-number: QTBUG-55585
Change-Id: I5f10b35c40b0ae2ddc5568d70e254b787ac3f914
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
This commit is contained in:
Oswald Buddenhagen 2016-08-29 17:41:28 +02:00
parent eb1f6c63a5
commit 95eed6278a

View File

@ -104,18 +104,20 @@ include($$INC_PATH/include/$$MODULE_INCNAME/headers.pri, "", true)
alien_syncqt: return()
MODULE_INC_OUTDIR = $$MODULE_BASE_OUTDIR/include/$$MODULE_INCNAME
for (injection, SYNCQT.INJECTIONS) {
injects = $$split(injection, :)
dst_hdr = $$absolute_path($$member(injects, 0), $$INC_PATH/include/$$MODULE_INCNAME)
dst_hdr = $$absolute_path($$member(injects, 0), $$MODULE_INC_OUTDIR)
fwd_hdr = $$member(injects, 1)
MAIN_FWD = $$INC_PATH/include/$$MODULE_INCNAME/$$fwd_hdr
MAIN_FWD = $$MODULE_INC_OUTDIR/$$fwd_hdr
MAIN_FWD_CONT = '$${LITERAL_HASH}include "$$relative_path($$dst_hdr, $$dirname(MAIN_FWD))"'
write_file($$MAIN_FWD, MAIN_FWD_CONT)|error()
touch($$MAIN_FWD, $$dst_hdr)
!git_build: QMAKE_DISTCLEAN += $$MAIN_FWD
injects = $$member(injects, 2, -1)
for (inject, injects) {
CLASS_FWD = $$INC_PATH/include/$$MODULE_INCNAME/$$inject
CLASS_FWD = $$MODULE_INC_OUTDIR/$$inject
CLASS_FWD_CONT = '$${LITERAL_HASH}include "$$fwd_hdr"'
write_file($$CLASS_FWD, CLASS_FWD_CONT)|error()
touch($$CLASS_FWD, $$dst_hdr)