2012-10-23 20:15:43 +00:00
|
|
|
load(qt_build_paths)
|
2012-07-10 19:35:39 +00:00
|
|
|
|
2012-09-18 16:19:29 +00:00
|
|
|
!build_pass {
|
|
|
|
qtPrepareTool(QMAKE_SYNCQT, syncqt)
|
|
|
|
contains(QT_CONFIG, private_tests): \ # -developer-build
|
|
|
|
QMAKE_SYNCQT += -check-includes
|
2012-11-29 21:22:42 +00:00
|
|
|
QMAKE_SYNCQT += -module $$MODULE_INCNAME -mkspecsdir $$[QT_HOST_DATA/get]/mkspecs -outdir $$MODULE_BASE_OUTDIR $$MODULE_BASE_DIR
|
2012-09-18 16:19:29 +00:00
|
|
|
!silent: message($$QMAKE_SYNCQT)
|
|
|
|
system($$QMAKE_SYNCQT)|error("Failed to run: $$QMAKE_SYNCQT")
|
|
|
|
}
|
|
|
|
|
2012-04-25 09:41:09 +00:00
|
|
|
#load up the headers info
|
2012-11-29 21:22:42 +00:00
|
|
|
include($$MODULE_BASE_OUTDIR/include/$$MODULE_INCNAME/headers.pri, "", true)
|
2012-04-25 09:41:09 +00:00
|
|
|
|
2012-11-29 21:22:42 +00:00
|
|
|
lctarget = $$lower($$MODULE_INCNAME)
|
|
|
|
uctarget = $$upper($$MODULE_INCNAME)
|
2012-04-11 10:48:43 +00:00
|
|
|
|
2012-04-13 14:17:12 +00:00
|
|
|
defineTest(shouldMasterInclude) {
|
|
|
|
bn = $$basename(1)
|
|
|
|
contains(bn, .*_.*):return(false)
|
|
|
|
contains(bn, ^qconfig.*):return(false)
|
|
|
|
lines = $$cat($$_PRO_FILE_PWD_/$$1, lines)
|
|
|
|
contains(lines, $${LITERAL_HASH}pragma qt_no_master_include):return(false)
|
|
|
|
return(true)
|
|
|
|
}
|
|
|
|
|
2012-04-26 11:18:10 +00:00
|
|
|
# Create module version header
|
2012-04-11 10:48:43 +00:00
|
|
|
MODULE_VERSION_HEADER = $$find(SYNCQT.HEADER_FILES, (^|/)$${lctarget}version\\.h$)
|
|
|
|
count(MODULE_VERSION_HEADER, 1) {
|
|
|
|
MODULE_VERSION_HEADER = $$absolute_path($$MODULE_VERSION_HEADER, $$_PRO_FILE_PWD_)
|
|
|
|
|
2012-04-26 11:18:10 +00:00
|
|
|
!build_pass {
|
|
|
|
majorhexstr = $$format_number($$section(VERSION, ., 0, 0), width=2 zeropad obase=16)
|
|
|
|
minorhexstr = $$format_number($$section(VERSION, ., 1, 1), width=2 zeropad obase=16)
|
|
|
|
patchhexstr = $$format_number($$section(VERSION, ., 2, 2), width=2 zeropad obase=16)
|
|
|
|
modulehexstring = 0x$${majorhexstr}$${minorhexstr}$${patchhexstr}
|
|
|
|
MODULE_VERSION_HEADER_CONT = \
|
|
|
|
"/* This file was generated by qmake with the info from $${_PRO_FILE_}. */" \
|
|
|
|
"$${LITERAL_HASH}ifndef QT_$${uctarget}_VERSION_H" \
|
|
|
|
"$${LITERAL_HASH}define QT_$${uctarget}_VERSION_H" \
|
|
|
|
"" \
|
|
|
|
"$${LITERAL_HASH}define $${uctarget}_VERSION_STR \"$$VERSION\"" \
|
|
|
|
"" \
|
|
|
|
"$${LITERAL_HASH}define $${uctarget}_VERSION $$modulehexstring" \
|
|
|
|
"" \
|
|
|
|
"$${LITERAL_HASH}endif // QT_$${uctarget}_VERSION_H"
|
|
|
|
write_file($$MODULE_VERSION_HEADER, MODULE_VERSION_HEADER_CONT)|error("Aborting.")
|
|
|
|
}
|
|
|
|
|
2012-04-11 10:48:43 +00:00
|
|
|
HEADERS += $$MODULE_VERSION_HEADER
|
|
|
|
}
|
|
|
|
|
2012-04-13 14:17:12 +00:00
|
|
|
# Create a module master header
|
2012-11-29 21:22:42 +00:00
|
|
|
MODULE_MASTER_HEADER = $$MODULE_BASE_OUTDIR/include/$$MODULE_INCNAME/$$MODULE_INCNAME
|
2012-04-13 14:17:12 +00:00
|
|
|
!build_pass {
|
|
|
|
MODULE_MASTER_HEADER_CONT = \
|
|
|
|
"/* This file was generated by qmake with the info from $${_PRO_FILE_}. */" \
|
|
|
|
"$${LITERAL_HASH}ifndef QT_$${ucmodule}_MODULE_H" \
|
|
|
|
"$${LITERAL_HASH}define QT_$${ucmodule}_MODULE_H"
|
|
|
|
for(dep, MODULE_DEPENDS) {
|
|
|
|
depname = $$eval(QT.$${dep}.name)
|
|
|
|
MODULE_MASTER_HEADER_CONT += "$${LITERAL_HASH}include <$$depname/$$depname>"
|
|
|
|
}
|
|
|
|
for(hdr, SYNCQT.HEADER_FILES): \
|
|
|
|
shouldMasterInclude($$hdr): \
|
|
|
|
MODULE_MASTER_HEADER_CONT += "$${LITERAL_HASH}include \"$$replace(hdr, .*/, )\""
|
|
|
|
MODULE_MASTER_HEADER_CONT += "$${LITERAL_HASH}endif"
|
|
|
|
write_file($$MODULE_MASTER_HEADER, MODULE_MASTER_HEADER_CONT)|error("Aborting.")
|
|
|
|
}
|
|
|
|
SYNCQT.HEADER_FILES += $$MODULE_MASTER_HEADER
|
|
|
|
|
2012-04-25 09:41:09 +00:00
|
|
|
CONFIG += qt_install_headers
|