e1ff27ca28
when a module delegates to another module (as the activeqt ones do), it doesn't have a master header to be included. we could derive the real master header by doing a transitive dependency resolution and some filtering, but that seems unnecessarily complex. Task-number: QTBUG-41892 Change-Id: Ie7ce51a837ac06e929b204ec734206c11b3ae241 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
79 lines
2.8 KiB
Plaintext
79 lines
2.8 KiB
Plaintext
#
|
|
# W A R N I N G
|
|
# -------------
|
|
#
|
|
# This file is not part of the Qt API. It exists purely as an
|
|
# implementation detail. It may change from version to version
|
|
# without notice, or even be removed.
|
|
#
|
|
# We mean it.
|
|
#
|
|
|
|
load(qt_build_paths)
|
|
|
|
!build_pass:git_build {
|
|
qtPrepareTool(QMAKE_SYNCQT, syncqt, , system)
|
|
minimal_syncqt {
|
|
QMAKE_SYNCQT += -minimal $$QMAKE_SYNCQT_OPTIONS
|
|
} else {
|
|
contains(QT_CONFIG, private_tests): \ # -developer-build
|
|
QMAKE_SYNCQT += -check-includes
|
|
QMAKE_SYNCQT += -module $$MODULE_INCNAME -version $$VERSION
|
|
}
|
|
QMAKE_SYNCQT += \
|
|
-outdir $$MODULE_BASE_OUTDIR $$MODULE_SYNCQT_DIR
|
|
!silent: message($$QMAKE_SYNCQT)
|
|
system($$QMAKE_SYNCQT)|error("Failed to run: $$QMAKE_SYNCQT")
|
|
}
|
|
|
|
minimal_syncqt: return()
|
|
|
|
#load up the headers info
|
|
git_build: \
|
|
INC_PATH = $$MODULE_BASE_OUTDIR
|
|
else: \
|
|
INC_PATH = $$MODULE_BASE_INDIR
|
|
include($$INC_PATH/include/$$MODULE_INCNAME/headers.pri, "", true)
|
|
|
|
for (injection, SYNCQT.INJECTIONS) {
|
|
injects = $$split(injection, :)
|
|
fwd_hdr = $$member(injects, 1)
|
|
MAIN_FWD = $$INC_PATH/include/$$MODULE_INCNAME/$$fwd_hdr
|
|
MAIN_FWD_CONT = '$${LITERAL_HASH}include "$$member(injects, 0)"'
|
|
write_file($$MAIN_FWD, MAIN_FWD_CONT)|error("Aborting.")
|
|
injects = $$member(injects, 2, -1)
|
|
for (inject, injects) {
|
|
CLASS_FWD = $$INC_PATH/include/$$MODULE_INCNAME/$$inject
|
|
CLASS_FWD_CONT = '$${LITERAL_HASH}include "$$fwd_hdr"'
|
|
write_file($$CLASS_FWD, CLASS_FWD_CONT)|error("Aborting.")
|
|
}
|
|
}
|
|
|
|
autogen_warning = \
|
|
"/* This file was generated by qmake with the info from <root>/$$relative_path($$_PRO_FILE_, $$MODULE_BASE_INDIR). */"
|
|
|
|
# Create a module master depends header
|
|
MODULE_MASTER_DEPS_HEADER = $$MODULE_BASE_OUTDIR/include/$$MODULE_INCNAME/$${MODULE_INCNAME}Depends
|
|
!build_pass {
|
|
MODULE_MASTER_DEPS_HEADER_CONT = $$autogen_warning
|
|
MODULE_MASTER_DEPS_HEADER_CONT += "$${LITERAL_HASH}ifdef __cplusplus /* create empty PCH in C mode */"
|
|
for(dep, MODULE_DEPENDS) {
|
|
depname = $$eval(QT.$${dep}.master_header)
|
|
isEmpty(depname): \
|
|
depname = $$eval(QT.$${dep}.name)
|
|
MODULE_MASTER_DEPS_HEADER_CONT += "$${LITERAL_HASH}include <$$depname/$$depname>"
|
|
}
|
|
MODULE_MASTER_DEPS_HEADER_CONT += "$${LITERAL_HASH}endif"
|
|
write_file($$MODULE_MASTER_DEPS_HEADER, MODULE_MASTER_DEPS_HEADER_CONT)|error("Aborting.")
|
|
}
|
|
SYNCQT.HEADER_FILES += $$MODULE_MASTER_DEPS_HEADER
|
|
|
|
# Automatically enable precompiled headers for Qt modules,
|
|
# except for Gcc/Windows: Larger precompiled headers crash cc1plus.exe
|
|
# (e.g. with i686-4.8.2-release-posix-dwarf-rt_v3-rev3)
|
|
!gcc|!equals(QMAKE_HOST.os, Windows) {
|
|
isEmpty(PRECOMPILED_HEADER): PRECOMPILED_HEADER = $$MODULE_MASTER_DEPS_HEADER
|
|
}
|
|
|
|
CONFIG += qt_install_headers
|