require modules to define their version
otherwise they would inherit it from qtbase, which may effectively result in a lie if building against a different release. for convenience we define the version centrally per repo. qtbase is special, in that we use the version defined in qglobal.h to avoid defining it redundantly (the instance in qglobal.h is currently needed to bootstrap qmake; the configures would need some work to change this). Task-number: QTBUG-29838 Change-Id: Ie9a5b0ff0d64b69ff2d34af2f7c42d6278e957cc Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
711773776e
commit
b4d3047422
@ -1,2 +1,5 @@
|
|||||||
load(qt_build_config)
|
load(qt_build_config)
|
||||||
CONFIG += qt_example_installs
|
CONFIG += qt_example_installs
|
||||||
|
|
||||||
|
# In qtbase, all modules follow qglobal.h
|
||||||
|
MODULE_VERSION = $$QT_VERSION
|
||||||
|
@ -25,11 +25,13 @@ QDOC += -outputdir $$QMAKE_DOCS_OUTPUTDIR
|
|||||||
!build_online_docs: \
|
!build_online_docs: \
|
||||||
QDOC += -installdir $$[QT_INSTALL_DOCS]
|
QDOC += -installdir $$[QT_INSTALL_DOCS]
|
||||||
qtver.name = QT_VERSION
|
qtver.name = QT_VERSION
|
||||||
qtver.value = $$QT_VERSION
|
qtver.value = $$VERSION
|
||||||
|
isEmpty(qtver.value): qtver.value = $$MODULE_VERSION
|
||||||
|
isEmpty(qtver.value): error("No version for documentation specified.")
|
||||||
qtmver.name = QT_VER
|
qtmver.name = QT_VER
|
||||||
qtmver.value = $${QT_MAJOR_VERSION}.$${QT_MINOR_VERSION}
|
qtmver.value = $$replace(qtver.value, ^(\\d+\\.\\d+).*$, \\1)
|
||||||
qtvertag.name = QT_VERSION_TAG
|
qtvertag.name = QT_VERSION_TAG
|
||||||
qtvertag.value = $$replace(QT_VERSION, \.,)
|
qtvertag.value = $$replace(qtver.value, \.,)
|
||||||
qtAddToolEnv(QDOC, qtver qtmver qtvertag)
|
qtAddToolEnv(QDOC, qtver qtmver qtvertag)
|
||||||
doc_command = $$QDOC $$QMAKE_DOCS
|
doc_command = $$QDOC $$QMAKE_DOCS
|
||||||
prepare_docs {
|
prepare_docs {
|
||||||
|
@ -20,7 +20,8 @@
|
|||||||
load(qt_build_config) # loads qmodule.pri if hasn't been loaded already
|
load(qt_build_config) # loads qmodule.pri if hasn't been loaded already
|
||||||
|
|
||||||
isEmpty(MODULE):MODULE = $$section($$list($$basename(_PRO_FILE_)), ., 0, 0)
|
isEmpty(MODULE):MODULE = $$section($$list($$basename(_PRO_FILE_)), ., 0, 0)
|
||||||
isEmpty(VERSION):VERSION = $$QT_VERSION
|
isEmpty(VERSION): VERSION = $$MODULE_VERSION
|
||||||
|
isEmpty(VERSION): error("Module does not define version.")
|
||||||
|
|
||||||
# Compile as shared/DLL or static according to the option given to configure
|
# Compile as shared/DLL or static according to the option given to configure
|
||||||
# unless overridden. Host builds are always static
|
# unless overridden. Host builds are always static
|
||||||
|
Loading…
Reference in New Issue
Block a user